Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
1f47a24a
Unverified
Commit
1f47a24a
authored
Jan 26, 2024
by
Turetskii Mikhail
Committed by
GitHub
Jan 26, 2024
Browse files
fix: corrected misleading log message in save_pretrained function (#28699)
parent
bbe30c69
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
src/transformers/modeling_utils.py
src/transformers/modeling_utils.py
+1
-2
No files found.
src/transformers/modeling_utils.py
View file @
1f47a24a
...
...
@@ -2495,8 +2495,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
save_function
(
shard
,
os
.
path
.
join
(
save_directory
,
shard_file
))
if
index
is
None
:
weights_file_name
=
SAFE_WEIGHTS_NAME
if
safe_serialization
else
WEIGHTS_NAME
path_to_weights
=
os
.
path
.
join
(
save_directory
,
_add_variant
(
weights_file_name
,
variant
))
path_to_weights
=
os
.
path
.
join
(
save_directory
,
weights_name
)
logger
.
info
(
f
"Model weights saved in
{
path_to_weights
}
"
)
else
:
save_index_file
=
SAFE_WEIGHTS_INDEX_NAME
if
safe_serialization
else
WEIGHTS_INDEX_NAME
...
...
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