Skip to content
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

Remove RichProgressCallback from examples #2053

Merged
merged 5 commits into from
Sep 11, 2024
Merged

Remove RichProgressCallback from examples #2053

merged 5 commits into from
Sep 11, 2024

Conversation

lewtun
Copy link
Member

@lewtun lewtun commented Sep 11, 2024

What does this PR do?

This PR removes the RichProgressCallback from the example scripts because it (a) leads to very messy logs in distributed training, (b) produces hard-to-trace bugs like those encountered in #2043 and (c) introduces a lot of unnecessary branching logic to our scripts just for aesthetic purposes. It has also led to headaches in other libs like accelerate as noted in the issues below:

See also this internal thread where rich interfered with cloud training: https://huggingface.slack.com/archives/C04EX6W3QSY/p1720008806136549

Questions

  • Does this count as a breaking change since we are technically changing the aesthetics of the CLI?
  • Would a less aggressive change be preferred, where I simply set TRL_USE_RICH=False by default?

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? Here are the
    documentation guidelines.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@@ -424,12 +423,6 @@ def make_inputs_require_grad(module, input, output):
elif self.args.max_steps == -1 and args.packing:
self.train_dataset.infinite = False

if any(isinstance(callback, RichProgressCallback) for callback in self.callback_handler.callbacks):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason this was only included in the SFT trainer and no others - I removed it for consistency

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@lewtun lewtun requested a review from qgallouedec September 11, 2024 13:00
@lewtun lewtun merged commit a8fd6dc into main Sep 11, 2024
10 checks passed
@lewtun lewtun deleted the remove-rich branch September 11, 2024 14:51
@lewtun lewtun mentioned this pull request Sep 11, 2024
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.

3 participants