Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
5d6feecf
Unverified
Commit
5d6feecf
authored
May 19, 2022
by
Nathan Dahlberg
Committed by
GitHub
May 19, 2022
Browse files
fix for 17292 (#17293)
parent
518bd02c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/modeling_utils.py
src/transformers/modeling_utils.py
+1
-1
No files found.
src/transformers/modeling_utils.py
View file @
5d6feecf
...
...
@@ -1815,7 +1815,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
"there is a file for TensorFlow weights. Use `from_tf=True` to load this model from those "
"weights."
)
elif
os
.
path
.
join
(
pretrained_model_name_or_path
,
FLAX_WEIGHTS_NAME
):
elif
os
.
path
.
isfile
(
os
.
path
.
join
(
pretrained_model_name_or_path
,
FLAX_WEIGHTS_NAME
)
)
:
raise
EnvironmentError
(
f
"Error no file named
{
WEIGHTS_NAME
}
found in directory
{
pretrained_model_name_or_path
}
but "
"there is a file for Flax weights. Use `from_flax=True` to load this model from those "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment