-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[core
] Fix possibility to passNoneType
objects in prepare
#1561
Conversation
The documentation is not available anymore as the PR was closed or merged. |
core
] add possibility to pass nonetype objects in prepare
core
] Fix possibility to passNoneType
objects in prepare
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 for the fix!
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!
Can you also add a test where |
sure, adding it now |
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!
* add possibility to pass nonetype objects * adds nice test
What does this PR do?
Fixes huggingface/trl#413 and the current CI in TRL :D https://github.com/lvwerra/trl/actions/runs/5204023029/jobs/9387749684?pr=412
Before #1555 it was possible to pass
NoneType
objects into prepare and that function would do nothing with it and return it.Adding a simple check
if item is not None:
before setting the_is_accelerate_prepare
attribute circumvents the bugcc @sgugger @muellerzr