-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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 FlaxPretTrainedModel pt weights check #19133
Conversation
The documentation is not available anymore as the PR was closed or merged. |
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 the fix!
@@ -664,13 +664,14 @@ def from_pretrained( | |||
# Load from a sharded Flax checkpoint | |||
archive_file = os.path.join(pretrained_model_name_or_path, FLAX_WEIGHTS_INDEX_NAME) | |||
is_sharded = True | |||
# At this stage we don't have a weight file so we will raise an error. |
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.
Not sure why this comment is deleted as an error is raised after this stage (just different ones depending on the if). It should be left here.
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.
oh indded
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Fix FlaxPretTrainedModel pt weights check * Update src/transformers/modeling_flax_utils.py Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * fix raise comment Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
What does this PR do?
files tab should make it clear on what's being changed.