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

Do not prepare lr scheduler as it as the right number of steps #24088

Merged
merged 7 commits into from Jun 7, 2023

Conversation

sgugger
Copy link
Collaborator

@sgugger sgugger commented Jun 7, 2023

What does this PR do?

Right now the LR scheduler is prepared by the Accelerate but it has a number of steps that already accounts for the number of processes. This results in the LR scheduler being stepp through num_processes too fast. This PR thus removes the lr_scheduler from the prepared objects.

Should fix #23986

Copy link
Contributor

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

Copy link
Contributor

@pacman100 pacman100 left a comment

Choose a reason for hiding this comment

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

Thank you @sgugger for the deep dive and super quick PR resolving the issue, LGTM! 🤗

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 7, 2023

The documentation is not available anymore as the PR was closed or merged.

@sgugger sgugger merged commit 2c887cf into main Jun 7, 2023
22 checks passed
@sgugger sgugger deleted the scheduler_fixes branch June 7, 2023 19:31
novice03 pushed a commit to novice03/transformers that referenced this pull request Jun 23, 2023
…ngface#24088)

* Do not prepare lr scheduler as it as the right number of steps

* Trigger CI

* Trigger CI

* Trigger CI

* Add fake comment

* Remove fake comment

* Trigger CI please!
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.

learn_rate behavior is not expected when using =transformers.TrainingArguments
4 participants