diff --git a/tests/tests_pytorch/test_cli.py b/tests/tests_pytorch/test_cli.py index 5e864cea3568d..8694a87489403 100644 --- a/tests/tests_pytorch/test_cli.py +++ b/tests/tests_pytorch/test_cli.py @@ -1233,7 +1233,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)