Skip to content

Commit f4cefa0

Browse files
awaelchlifnhirwa
authored andcommitted
test: move the pretrained model to the same device as current model before assertion (#19668)
Co-authored-by: Felix Hirwa Nshuti <[email protected]>
1 parent 67a5e08 commit f4cefa0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/tests_pytorch/models/test_restore.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ def test_load_model_from_checkpoint(tmpdir, model_template):
446446
"limit_test_batches": 2,
447447
"callbacks": [ModelCheckpoint(dirpath=tmpdir, monitor="val_loss", save_top_k=-1)],
448448
"default_root_dir": tmpdir,
449+
"accelerator": "cpu",
449450
}
450451

451452
# fit model

0 commit comments

Comments
 (0)