mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-11 12:31:23 +08:00
added clean slurm save load test
This commit is contained in:
@@ -182,6 +182,7 @@ def test_cpu_slurm_save_load():
|
||||
assert trainer.global_step == real_global_step and trainer.global_step != 20000000
|
||||
|
||||
# predict with loaded model to make sure answers are the same
|
||||
trainer.model.eval()
|
||||
new_pred = trainer.model(x)
|
||||
assert torch.all(torch.eq(pred_before_saving, new_pred)).item() == 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user