From 50331e08e111d6b9ebb25a21a86b7170b46c5f1f Mon Sep 17 00:00:00 2001 From: Mauricio Villegas Date: Wed, 21 Dec 2022 15:10:32 +0100 Subject: [PATCH] Small fix in test_cli.py to avoid failure with future version of jsonargparse (#16156) --- tests/tests_pytorch/test_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests_pytorch/test_cli.py b/tests/tests_pytorch/test_cli.py index 12308f8ea5498..8462680c884d1 100644 --- a/tests/tests_pytorch/test_cli.py +++ b/tests/tests_pytorch/test_cli.py @@ -1314,7 +1314,7 @@ def configure_optimizers(self, optimizer, lr_scheduler=None): [optimizer], [scheduler] = cli.model.configure_optimizers() assert isinstance(optimizer, SGD) assert isinstance(scheduler, StepLR) - with mock.patch("sys.argv", ["any.py", "--lr_scheduler=StepLR"]): + with mock.patch("sys.argv", ["any.py", "--lr_scheduler=StepLR", "--lr_scheduler.step_size=50"]): cli = MyCLI() [optimizer], [scheduler] = cli.model.configure_optimizers() assert isinstance(optimizer, SGD)