Skip to content

ClearML logging of visualization in RewardTrainer evaluation #3602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ioverho
Copy link

@ioverho ioverho commented Jun 16, 2025

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

  1. Added the 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

  1. Added a is_clearml_available function
  2. Added a get_clearml_experiment_url function
  3. Added a log_table_to_clearml_task function

trainer.reward_trainer.RewardTrainer

  1. Checks for a num_print_samples from the function signature, and then from the trainer args.
  2. Adds the margin to the table, if it is available
  3. Reports the table to ClearML, if it's available, using the new functions imported from trainer.utils

Fixes

None, I just use ClearML instead of wandb or comet-ml, and I wanted the visualizations logged.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline, Pull Request section?
  • Was this discussed/approved via a GitHub issue? Please add a link to it if that's the case.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@ioverho ioverho marked this pull request as ready for review June 16, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant