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
68fa1e85
Unverified
Commit
68fa1e85
authored
Dec 22, 2023
by
lin yudong
Committed by
GitHub
Dec 22, 2023
Browse files
update the logger message with accordant weights_file_name (#28181)
Co-authored-by:
yudong.lin
<
yudong.lin@funplus.com
>
parent
74d9d0ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/transformers/modeling_utils.py
src/transformers/modeling_utils.py
+2
-1
No files found.
src/transformers/modeling_utils.py
View file @
68fa1e85
...
@@ -2408,7 +2408,8 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
...
@@ -2408,7 +2408,8 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
save_function
(
shard
,
os
.
path
.
join
(
save_directory
,
shard_file
))
save_function
(
shard
,
os
.
path
.
join
(
save_directory
,
shard_file
))
if
index
is
None
:
if
index
is
None
:
path_to_weights
=
os
.
path
.
join
(
save_directory
,
_add_variant
(
WEIGHTS_NAME
,
variant
))
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
))
logger
.
info
(
f
"Model weights saved in
{
path_to_weights
}
"
)
logger
.
info
(
f
"Model weights saved in
{
path_to_weights
}
"
)
else
:
else
:
save_index_file
=
SAFE_WEIGHTS_INDEX_NAME
if
safe_serialization
else
WEIGHTS_INDEX_NAME
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