-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
Fix use_seedable_sampler
when initializing Accelerator
#31449
Conversation
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. |
Regarding the above, there is |
Thx for sharing ! I'm also worried about showing warnings that could be prevented ! In this case, the default behavior of |
My understanding was if the version of accelerate is <0.26, it doesn't really matter what the value of It is possible we have accelerator configs saved out, from this version of transformers which are compatible with some use cases i.e. they contain |
Before accelerate 0.26, the training results are not fully reproducible using a different sampling technique. (use_seedable_sampler=False behavior). Then, we introduced
Yes, it will not throw an error if accelerate > v0.28 ( |
Ah, sorry, I should have been clearer. If accelerate version is < v0.26 and we're on the current version of transformers, are there settings which trainer and accelerate run without error i.e. I would see in the config that |
Basically.
I think it'd be safer to do a small bump to 0.24.0, and then in December we can fully bump to 0.26.0 (or around then). As the important part is ensuring we have the seedable sampler enabled, which our logic currently has. This PR will successfully do what we need, the secondary part here is moreso about how to address our MVP version |
@muellerzr OK, happy for us to bump the accelerate version. Are there any breaking changes between 0.21 -> 0.24 or 0.26 which we should flag on the release notes? cc @ydshieh |
Nope, there are none! |
For bumping versions, it would be a good chance to follow https://www.notion.so/huggingface2/Circle-Ci-Docker-images-3bedc8bc602e4ca88c34c6c194accd74 and make a hands on it :-) ping me or @ArthurZucker if there is anything unclear regarding this process or any issue encountered. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - change LGTM. Would be good to confirm if we can bump the minimum accelerate version and just remove the dependancy here altogether
Yes, I'm working on that right now. I will open a PR soon ! |
What does this PR do ?
This PR make sure that we don't pass
use_seedable_sampler
in Accelerator if we don't have the required version. Users are getting initialization error sinceAcceleratorConfig
class have theuse_seedable_sampler
arg that was introduced in v0.26 in accelerate. However, the required version of accelerate in transformers is v0.21However, I'm facing with an issue here. The default value in accelerate is
use_seedable_sampler
isFalse
but in transformers, it isTrue
. So, for users who have version of accelerate < 0.26, should I log a warning ifuse_seedable_sampler
isTrue
? The warning is necessary since the behavior differs but I don't want to add too many warnings. cc @muellerzr @amyerobertsAnother solution would be to just change the min required version of accelerate to v0.26 when installing transformers.
Fixes #31433