@@ -1222,7 +1222,7 @@ def test_lightning_cli_model_short_arguments():
1222
1222
):
1223
1223
cli = LightningCLI (trainer_defaults = {"fast_dev_run" : 1 })
1224
1224
assert isinstance (cli .model , BoringModel )
1225
- run .assert_called_once_with (cli .model , ANY , ANY , ANY , ANY )
1225
+ run .assert_called_once_with (cli .model , ANY , ANY , ANY , ANY , ANY )
1226
1226
1227
1227
with (
1228
1228
mock .patch ("sys.argv" , ["any.py" , "--model=TestModel" , "--model.foo" , "123" ]),
@@ -1250,7 +1250,7 @@ def test_lightning_cli_datamodule_short_arguments():
1250
1250
):
1251
1251
cli = LightningCLI (BoringModel , trainer_defaults = {"fast_dev_run" : 1 })
1252
1252
assert isinstance (cli .datamodule , BoringDataModule )
1253
- run .assert_called_once_with (ANY , ANY , ANY , cli .datamodule , ANY )
1253
+ run .assert_called_once_with (ANY , ANY , ANY , cli .datamodule , ANY , ANY )
1254
1254
1255
1255
with (
1256
1256
mock .patch ("sys.argv" , ["any.py" , "--data=MyDataModule" , "--data.foo" , "123" ]),
@@ -1271,7 +1271,7 @@ def test_lightning_cli_datamodule_short_arguments():
1271
1271
cli = LightningCLI (trainer_defaults = {"fast_dev_run" : 1 })
1272
1272
assert isinstance (cli .model , BoringModel )
1273
1273
assert isinstance (cli .datamodule , BoringDataModule )
1274
- run .assert_called_once_with (cli .model , ANY , ANY , cli .datamodule , ANY )
1274
+ run .assert_called_once_with (cli .model , ANY , ANY , cli .datamodule , ANY , ANY )
1275
1275
1276
1276
with (
1277
1277
mock .patch ("sys.argv" , ["any.py" , "--model" , "BoringModel" , "--data=MyDataModule" ]),
@@ -1447,7 +1447,7 @@ def test_lightning_cli_config_with_subcommand():
1447
1447
):
1448
1448
cli = LightningCLI (BoringModel )
1449
1449
1450
- test_mock .assert_called_once_with (cli .trainer , cli .model , verbose = True , ckpt_path = "foobar" )
1450
+ test_mock .assert_called_once_with (cli .trainer , cli .model , verbose = True , ckpt_path = "foobar" , weights_only = False )
1451
1451
assert cli .trainer .limit_test_batches == 1
1452
1452
1453
1453
@@ -1463,7 +1463,9 @@ def test_lightning_cli_config_before_subcommand():
1463
1463
):
1464
1464
cli = LightningCLI (BoringModel )
1465
1465
1466
- test_mock .assert_called_once_with (cli .trainer , model = cli .model , verbose = True , ckpt_path = "foobar" )
1466
+ test_mock .assert_called_once_with (
1467
+ cli .trainer , model = cli .model , verbose = True , ckpt_path = "foobar" , weights_only = False
1468
+ )
1467
1469
assert cli .trainer .limit_test_batches == 1
1468
1470
1469
1471
save_config_callback = cli .trainer .callbacks [0 ]
@@ -1476,7 +1478,7 @@ def test_lightning_cli_config_before_subcommand():
1476
1478
):
1477
1479
cli = LightningCLI (BoringModel )
1478
1480
1479
- validate_mock .assert_called_once_with (cli .trainer , cli .model , verbose = False , ckpt_path = "barfoo" )
1481
+ validate_mock .assert_called_once_with (cli .trainer , cli .model , verbose = False , ckpt_path = "barfoo" , weights_only = False )
1480
1482
assert cli .trainer .limit_val_batches == 1
1481
1483
1482
1484
save_config_callback = cli .trainer .callbacks [0 ]
@@ -1494,7 +1496,9 @@ def test_lightning_cli_config_before_subcommand_two_configs():
1494
1496
):
1495
1497
cli = LightningCLI (BoringModel )
1496
1498
1497
- test_mock .assert_called_once_with (cli .trainer , model = cli .model , verbose = True , ckpt_path = "foobar" )
1499
+ test_mock .assert_called_once_with (
1500
+ cli .trainer , model = cli .model , verbose = True , ckpt_path = "foobar" , weights_only = False
1501
+ )
1498
1502
assert cli .trainer .limit_test_batches == 1
1499
1503
1500
1504
with (
@@ -1503,7 +1507,7 @@ def test_lightning_cli_config_before_subcommand_two_configs():
1503
1507
):
1504
1508
cli = LightningCLI (BoringModel )
1505
1509
1506
- validate_mock .assert_called_once_with (cli .trainer , cli .model , verbose = False , ckpt_path = "barfoo" )
1510
+ validate_mock .assert_called_once_with (cli .trainer , cli .model , verbose = False , ckpt_path = "barfoo" , weights_only = False )
1507
1511
assert cli .trainer .limit_val_batches == 1
1508
1512
1509
1513
@@ -1515,7 +1519,7 @@ def test_lightning_cli_config_after_subcommand():
1515
1519
):
1516
1520
cli = LightningCLI (BoringModel )
1517
1521
1518
- test_mock .assert_called_once_with (cli .trainer , cli .model , verbose = True , ckpt_path = "foobar" )
1522
+ test_mock .assert_called_once_with (cli .trainer , cli .model , verbose = True , ckpt_path = "foobar" , weights_only = False )
1519
1523
assert cli .trainer .limit_test_batches == 1
1520
1524
1521
1525
@@ -1528,7 +1532,9 @@ def test_lightning_cli_config_before_and_after_subcommand():
1528
1532
):
1529
1533
cli = LightningCLI (BoringModel )
1530
1534
1531
- test_mock .assert_called_once_with (cli .trainer , model = cli .model , verbose = False , ckpt_path = "foobar" )
1535
+ test_mock .assert_called_once_with (
1536
+ cli .trainer , model = cli .model , verbose = False , ckpt_path = "foobar" , weights_only = False
1537
+ )
1532
1538
assert cli .trainer .limit_test_batches == 1
1533
1539
assert cli .trainer .fast_dev_run == 1
1534
1540
0 commit comments