diff --git a/tests/tests_pytorch/test_cli.py b/tests/tests_pytorch/test_cli.py index b6ca274151200..360720e6c05f9 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)