Skip to content

Commit

Permalink
Fix warning message formatting in save_hyperparameters (#12498)
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Mar 29, 2022
1 parent 534aa17 commit 2de6a9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_lightning/utilities/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def save_hyperparameters(
if isinstance(init_args[k], nn.Module):
rank_zero_warn(
f"Attribute {k!r} is an instance of `nn.Module` and is already saved during checkpointing."
f" It is recommended to ignore them using `self.save_hyperparameters(ignore=[{k}!r])`."
f" It is recommended to ignore them using `self.save_hyperparameters(ignore=[{k!r}])`."
)

if not args:
Expand Down

0 comments on commit 2de6a9b

Please sign in to comment.