Skip to content

Commit

Permalink
update the logger message with accordant weights_file_name (huggingfa…
Browse files Browse the repository at this point in the history
…ce#28181)

Co-authored-by: yudong.lin <yudong.lin@funplus.com>
  • Loading branch information
2 people authored and Saibo-creator committed Jan 3, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 98f17f5 commit 04234f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/transformers/modeling_utils.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 04234f6

Please sign in to comment.