test: move the pretrained model to the same device as current model before assertion (#19668)

This commit is contained in:
Felix Hirwa Nshuti 2024-03-18 23:23:02 +05:30 committed by GitHub
parent b3bd871709
commit f4178d5d5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -446,6 +446,7 @@ def test_load_model_from_checkpoint(tmp_path, model_template):
"limit_test_batches": 2,
"callbacks": [ModelCheckpoint(dirpath=tmp_path, monitor="val_loss", save_top_k=-1)],
"default_root_dir": tmp_path,
"accelerator": "cpu",
}
# fit model