Fix #17893, removed dead code#17917
Fix #17893, removed dead code#17917sgugger merged 3 commits intohuggingface:mainfrom clefourrier:patch-1
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
There was a problem hiding this comment.
LGTM, thank you, @clefourrier !
I think we can also remove the line _keys_to_ignore_on_load_missing = [r"position_ids"] (line 1395), but let's wait for @sgugger to confirm.
|
Hey @clefourrier! The code quality error comes from a new release from |
|
Regarding the test from Lysandre on Slack There was a new release from black that has a slightly different behavior for the --preview flag that we use in the CI. If you see failures in the CI for the code quality test, with a large number of file changes (>500), please mention to the author that they just need to rebase on/merge main in order to benefit from the fix. |
|
@LysandreJik @ydshieh Should be good now! 😃 |
sgugger
left a comment
There was a problem hiding this comment.
I'll defer to @patrickvonplaten who knows the model best. Changes look good to me.
One last thing to change is the line
_keys_to_ignore_on_load_missing = [r"position_ids"]
later on in the pretrained model, which should be now
_keys_to_ignore_on_load_unexpected = [r"position_ids"]
Just in case there are some longformer checkpoints in the wild with a position_ids key in their state dict.
|
@sgugger Done :) |
patrickvonplaten
left a comment
There was a problem hiding this comment.
Thanks for the fix! Great catch :-)
* Removed dead position_id code, fix huggingface#17893 * Removed unused var * Now ignores removed (dead) dict key for backward comp
What does this PR do?
Fixes #17893
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@ydshieh