-
Notifications
You must be signed in to change notification settings - Fork 899
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 batch_size sanity check logic for split_batches
#2344
Conversation
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.
I think this solution makes sense, but I know this originates from Megatron so cc @pacman100 for guidance.
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.
Thank you @izhx for the fixes in cases when the Batch Sampler doesn't conform to PyTorch. Makes sense.
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. |
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.
If Sourab is happy, I'm happy. But would definitely be happier if @stas00 could also give this an all-clear? :)
accelerate/src/accelerate/data_loader.py Lines 487 to 492 in c0a9472
it always calls
|
Co-authored-by: Stas Bekman <stas00@users.noreply.github.com>
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.
let's land this one, @muellerzr?
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 for iterating! (Good to go once tests pass)
What does this PR do?
Fixes #2285 and PR/2310 comment: Unfortunately, this broke Megatron DL
Some libraries may not follow PyTorch's design of
BatchSampler
.If the
batch_size
cannot be found, a warning is left to notify the user.Do anyone have suggestions for such situations?
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
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.
@muellerzr @BenjaminBossan