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)