Skip to content

Commit

Permalink
fixes slurm weights saving
Browse files Browse the repository at this point in the history
  • Loading branch information
williamFalcon committed Jun 24, 2020
1 parent 35af48c commit e66a123
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/trainer/test_trainer_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def test_trainingstep_dict(tmpdir):

out = trainer.run_training_batch(batch, batch_idx)
assert out.signal == 0
assert out.all_log_metrics['log_acc1'] == 12.0
assert out.all_log_metrics['log_acc2'] == 7.0
assert out.batch_log_metrics['log_acc1'] == 12.0
assert out.batch_log_metrics['log_acc2'] == 7.0

pbar_metrics = out.training_step_output_for_epoch_end['pbar_on_batch_end']
assert pbar_metrics['pbar_acc1'] == 17.0
Expand Down Expand Up @@ -55,8 +55,8 @@ def training_step_with_step_end(tmpdir):

out = trainer.run_training_batch(batch, batch_idx)
assert out.signal == 0
assert out.all_log_metrics['log_acc1'] == 12.0
assert out.all_log_metrics['log_acc2'] == 7.0
assert out.batch_log_metrics['log_acc1'] == 12.0
assert out.batch_log_metrics['log_acc2'] == 7.0

pbar_metrics = out.training_step_output_for_epoch_end['pbar_on_batch_end']
assert pbar_metrics['pbar_acc1'] == 17.0
Expand Down Expand Up @@ -91,8 +91,8 @@ def test_full_training_loop_dict(tmpdir):

out = trainer.run_training_batch(batch, batch_idx)
assert out.signal == 0
assert out.all_log_metrics['log_acc1'] == 12.0
assert out.all_log_metrics['log_acc2'] == 7.0
assert out.batch_log_metrics['log_acc1'] == 12.0
assert out.batch_log_metrics['log_acc2'] == 7.0

pbar_metrics = out.training_step_output_for_epoch_end['pbar_on_batch_end']
assert pbar_metrics['pbar_acc1'] == 17.0
Expand Down Expand Up @@ -127,8 +127,8 @@ def test_train_step_epoch_end(tmpdir):

out = trainer.run_training_batch(batch, batch_idx)
assert out.signal == 0
assert out.all_log_metrics['log_acc1'] == 12.0
assert out.all_log_metrics['log_acc2'] == 7.0
assert out.batch_log_metrics['log_acc1'] == 12.0
assert out.batch_log_metrics['log_acc2'] == 7.0

pbar_metrics = out.training_step_output_for_epoch_end['pbar_on_batch_end']
assert pbar_metrics['pbar_acc1'] == 17.0
Expand Down

0 comments on commit e66a123

Please sign in to comment.