Skip to content
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

update the logger message with accordant weights_file_name #28181

Merged
merged 2 commits into from
Dec 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/transformers/modeling_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,8 @@ def save_pretrained(
save_function(shard, os.path.join(save_directory, shard_file))

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}")
else:
save_index_file = SAFE_WEIGHTS_INDEX_NAME if safe_serialization else WEIGHTS_INDEX_NAME
Expand Down
Loading