ClearML logging of visualization in RewardTrainer evaluation #3602
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds very basic support for logging the output of
RewardTrainer.visualize_samples
with ClearML.Also adds the reward margin to this output, and allows the user to specify how many samples should be visualized using the
TrainingArgs
.Specifics
trainer.reward_config.RewardConfig
num_print_samples
parameter, which should control the number of samples that get printed during evaluation. It can be set to 0 to skip printing altogether.trainer.utils
is_clearml_available
functionget_clearml_experiment_url
functionlog_table_to_clearml_task
functiontrainer.reward_trainer.RewardTrainer
num_print_samples
from the function signature, and then from the trainer args.trainer.utils
Fixes
None, I just use ClearML instead of wandb or comet-ml, and I wanted the visualizations logged.
Before submitting