From 64586f271d6ee9c1a771ca21297a6c39b77095c4 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Fri, 26 Jul 2019 23:02:18 -0400 Subject: [PATCH] added clean slurm save load test --- tests/test_models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_models.py b/tests/test_models.py index e95870e8c4..6540204abf 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -40,9 +40,10 @@ def test_cpu_slurm_save_load(): exp.argparse(hparams) exp.save() + cluster_a = SlurmCluster() trainer_options = dict( max_nb_epochs=1, - cluster=SlurmCluster(), + cluster=cluster_a, experiment=exp, checkpoint_callback=ModelCheckpoint(save_dir) ) @@ -82,7 +83,8 @@ def test_cpu_slurm_save_load(): max_nb_epochs=1, cluster=SlurmCluster(continue_tng_hparams), experiment=exp, - checkpoint_callback=ModelCheckpoint(save_dir) + checkpoint_callback=ModelCheckpoint(save_dir), + hpc_exp_number=cluster_a.hpc_exp_number ) trainer = Trainer(**trainer_options) model = LightningTestModel(hparams)