Unverified Commit 1f47a24a authored by Turetskii Mikhail's avatar Turetskii Mikhail Committed by GitHub
Browse files

fix: corrected misleading log message in save_pretrained function (#28699)

parent bbe30c69
...@@ -2495,8 +2495,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix ...@@ -2495,8 +2495,7 @@ 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:
weights_file_name = SAFE_WEIGHTS_NAME if safe_serialization else WEIGHTS_NAME path_to_weights = os.path.join(save_directory, 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment