Skip to content

Commit

Permalink
remove show_progress_bar from other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerard Bentley committed Mar 24, 2020
1 parent 045d575 commit 96eb725
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 25 deletions.
6 changes: 1 addition & 5 deletions tests/test_amp.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def test_amp_single_gpu(tmpdir):

trainer_options = dict(
default_save_path=tmpdir,
show_progress_bar=True,
max_epochs=1,
gpus=1,
distributed_backend='ddp',
Expand All @@ -45,7 +44,6 @@ def test_no_amp_single_gpu(tmpdir):

trainer_options = dict(
default_save_path=tmpdir,
show_progress_bar=True,
max_epochs=1,
gpus=1,
distributed_backend='dp',
Expand All @@ -71,7 +69,6 @@ def test_amp_gpu_ddp(tmpdir):

trainer_options = dict(
default_save_path=tmpdir,
show_progress_bar=True,
max_epochs=1,
gpus=2,
distributed_backend='ddp',
Expand All @@ -97,7 +94,6 @@ def test_amp_gpu_ddp_slurm_managed(tmpdir):
model = LightningTestModel(hparams)

trainer_options = dict(
show_progress_bar=True,
max_epochs=1,
gpus=[0],
distributed_backend='ddp',
Expand Down Expand Up @@ -135,7 +131,7 @@ def test_cpu_model_with_amp(tmpdir):

trainer_options = dict(
default_save_path=tmpdir,
show_progress_bar=False,
progress_bar_refresh_rate=0,
logger=tutils.get_test_tube_logger(tmpdir),
max_epochs=1,
train_percent_check=0.4,
Expand Down
19 changes: 11 additions & 8 deletions tests/test_cpu_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_early_stopping_cpu_model(tmpdir):
gradient_clip_val=1.0,
overfit_pct=0.20,
track_grad_norm=2,
show_progress_bar=True,
print_nan_grads=True,
logger=tutils.get_test_tube_logger(tmpdir),
train_percent_check=0.1,
val_percent_check=0.1,
Expand All @@ -49,7 +49,8 @@ def test_lbfgs_cpu_model(tmpdir):
trainer_options = dict(
default_save_path=tmpdir,
max_epochs=2,
show_progress_bar=False,
print_nan_grads=True,
progress_bar_refresh_rate=0,
weights_summary='top',
train_percent_check=1.0,
val_percent_check=0.2,
Expand All @@ -68,7 +69,8 @@ def test_default_logger_callbacks_cpu_model(tmpdir):
max_epochs=1,
gradient_clip_val=1.0,
overfit_pct=0.20,
show_progress_bar=False,
print_nan_grads=True,
progress_bar_refresh_rate=0,
train_percent_check=0.01,
val_percent_check=0.01,
)
Expand Down Expand Up @@ -96,7 +98,7 @@ def test_running_test_after_fitting(tmpdir):

trainer_options = dict(
default_save_path=tmpdir,
show_progress_bar=False,
progress_bar_refresh_rate=0,
max_epochs=4,
train_percent_check=0.4,
val_percent_check=0.2,
Expand Down Expand Up @@ -134,7 +136,7 @@ class CurrentTestModel(LightTrainDataloader, LightTestMixin, TestModelBase):
checkpoint = tutils.init_checkpoint_callback(logger)

trainer_options = dict(
show_progress_bar=False,
progress_bar_refresh_rate=0,
max_epochs=1,
train_percent_check=0.4,
val_percent_check=0.2,
Expand Down Expand Up @@ -229,7 +231,7 @@ def test_cpu_model(tmpdir):

trainer_options = dict(
default_save_path=tmpdir,
show_progress_bar=False,
progress_bar_refresh_rate=0,
logger=tutils.get_test_tube_logger(tmpdir),
max_epochs=1,
train_percent_check=0.4,
Expand All @@ -250,7 +252,8 @@ def test_all_features_cpu_model(tmpdir):
gradient_clip_val=1.0,
overfit_pct=0.20,
track_grad_norm=2,
show_progress_bar=False,
print_nan_grads=True,
progress_bar_refresh_rate=0,
logger=tutils.get_test_tube_logger(tmpdir),
accumulate_grad_batches=2,
max_epochs=1,
Expand Down Expand Up @@ -347,7 +350,7 @@ def test_single_gpu_model(tmpdir):

trainer_options = dict(
default_save_path=tmpdir,
show_progress_bar=False,
progress_bar_refresh_rate=0,
max_epochs=1,
train_percent_check=0.1,
val_percent_check=0.1,
Expand Down
9 changes: 4 additions & 5 deletions tests/test_gpu_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def test_multi_gpu_model_ddp2(tmpdir):
model, hparams = tutils.get_model()
trainer_options = dict(
default_save_path=tmpdir,
show_progress_bar=True,
max_epochs=1,
train_percent_check=0.4,
val_percent_check=0.2,
Expand All @@ -55,7 +54,7 @@ def test_multi_gpu_model_ddp(tmpdir):
model, hparams = tutils.get_model()
trainer_options = dict(
default_save_path=tmpdir,
show_progress_bar=False,
progress_bar_refresh_rate=0,
max_epochs=1,
train_percent_check=0.4,
val_percent_check=0.2,
Expand All @@ -76,7 +75,7 @@ def test_ddp_all_dataloaders_passed_to_fit(tmpdir):

model, hparams = tutils.get_model()
trainer_options = dict(default_save_path=tmpdir,
show_progress_bar=False,
progress_bar_refresh_rate=0,
max_epochs=1,
train_percent_check=0.4,
val_percent_check=0.2,
Expand Down Expand Up @@ -209,7 +208,7 @@ def test_multi_gpu_none_backend(tmpdir):
model, hparams = tutils.get_model()
trainer_options = dict(
default_save_path=tmpdir,
show_progress_bar=False,
progress_bar_refresh_rate=0,
max_epochs=1,
train_percent_check=0.1,
val_percent_check=0.1,
Expand All @@ -230,7 +229,7 @@ def test_multi_gpu_model_dp(tmpdir):
model, hparams = tutils.get_model()
trainer_options = dict(
default_save_path=tmpdir,
show_progress_bar=False,
progress_bar_refresh_rate=0,
distributed_backend='dp',
max_epochs=1,
train_percent_check=0.1,
Expand Down
10 changes: 4 additions & 6 deletions tests/test_restore_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_running_test_pretrained_model_ddp(tmpdir):
checkpoint = tutils.init_checkpoint_callback(logger)

trainer_options = dict(
show_progress_bar=False,
progress_bar_refresh_rate=0,
max_epochs=1,
train_percent_check=0.4,
val_percent_check=0.2,
Expand Down Expand Up @@ -82,7 +82,7 @@ def test_running_test_pretrained_model(tmpdir):
checkpoint = tutils.init_checkpoint_callback(logger)

trainer_options = dict(
show_progress_bar=False,
progress_bar_refresh_rate=0,
max_epochs=4,
train_percent_check=0.4,
val_percent_check=0.2,
Expand Down Expand Up @@ -115,7 +115,7 @@ def test_load_model_from_checkpoint(tmpdir):
model = LightningTestModel(hparams)

trainer_options = dict(
show_progress_bar=False,
progress_bar_refresh_rate=0,
max_epochs=2,
train_percent_check=0.4,
val_percent_check=0.2,
Expand Down Expand Up @@ -168,7 +168,6 @@ def test_running_test_pretrained_model_dp(tmpdir):
checkpoint = tutils.init_checkpoint_callback(logger)

trainer_options = dict(
show_progress_bar=True,
max_epochs=4,
train_percent_check=0.4,
val_percent_check=0.2,
Expand Down Expand Up @@ -206,7 +205,6 @@ def test_dp_resume(tmpdir):
model = LightningTestModel(hparams)

trainer_options = dict(
show_progress_bar=True,
max_epochs=3,
gpus=2,
distributed_backend='dp',
Expand Down Expand Up @@ -333,7 +331,7 @@ def test_model_saving_loading(tmpdir):

def test_load_model_with_missing_hparams(tmpdir):
trainer_options = dict(
show_progress_bar=False,
progress_bar_refresh_rate=0,
max_epochs=1,
checkpoint_callback=ModelCheckpoint(tmpdir, save_top_k=-1),
logger=False,
Expand Down
2 changes: 1 addition & 1 deletion tests/trainer/test_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def on_test_end(self, trainer, pl_module):
'max_epochs': 1,
'val_percent_check': 0.1,
'train_percent_check': 0.2,
'show_progress_bar': False
'progress_bar_refresh_rate': 0
}

assert not test_callback.on_init_start_called
Expand Down

0 comments on commit 96eb725

Please sign in to comment.