Skip to content

Commit 50331e0

Browse files
authored
Small fix in test_cli.py to avoid failure with future version of jsonargparse (#16156)
1 parent 0630444 commit 50331e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/tests_pytorch/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ def configure_optimizers(self, optimizer, lr_scheduler=None):
13141314
[optimizer], [scheduler] = cli.model.configure_optimizers()
13151315
assert isinstance(optimizer, SGD)
13161316
assert isinstance(scheduler, StepLR)
1317-
with mock.patch("sys.argv", ["any.py", "--lr_scheduler=StepLR"]):
1317+
with mock.patch("sys.argv", ["any.py", "--lr_scheduler=StepLR", "--lr_scheduler.step_size=50"]):
13181318
cli = MyCLI()
13191319
[optimizer], [scheduler] = cli.model.configure_optimizers()
13201320
assert isinstance(optimizer, SGD)

0 commit comments

Comments
 (0)