mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
update the logger message with accordant weights_file_name (#28181)
Co-authored-by: yudong.lin <yudong.lin@funplus.com>
This commit is contained in:
parent
74d9d0cebb
commit
68fa1e855b
@ -2408,7 +2408,8 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user