From 2de6a9bbbff44398f868a1594ed5a42bc726d872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20W=C3=A4lchli?= Date: Tue, 29 Mar 2022 05:46:21 +0200 Subject: [PATCH] Fix warning message formatting in save_hyperparameters (#12498) --- pytorch_lightning/utilities/parsing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/utilities/parsing.py b/pytorch_lightning/utilities/parsing.py index 467f50bbd5330..e535d52847600 100644 --- a/pytorch_lightning/utilities/parsing.py +++ b/pytorch_lightning/utilities/parsing.py @@ -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: