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 10, 2020
1 parent d85273b commit 0b84ec0
Show file tree
Hide file tree
Showing 5 changed files with 17 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
15 changes: 7 additions & 8 deletions tests/test_cpu_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def test_early_stopping_cpu_model(tmpdir):
overfit_pct=0.20,
track_grad_norm=2,
print_nan_grads=True,
show_progress_bar=True,
logger=tutils.get_test_tube_logger(tmpdir),
train_percent_check=0.1,
val_percent_check=0.1,
Expand All @@ -49,7 +48,7 @@ def test_lbfgs_cpu_model(tmpdir):
default_save_path=tmpdir,
max_epochs=2,
print_nan_grads=True,
show_progress_bar=False,
progress_bar_refresh_rate=0,
weights_summary='top',
train_percent_check=1.0,
val_percent_check=0.2,
Expand All @@ -69,7 +68,7 @@ def test_default_logger_callbacks_cpu_model(tmpdir):
gradient_clip_val=1.0,
overfit_pct=0.20,
print_nan_grads=True,
show_progress_bar=False,
progress_bar_refresh_rate=0,
train_percent_check=0.01,
val_percent_check=0.01,
)
Expand Down Expand Up @@ -97,7 +96,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 @@ -135,7 +134,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 @@ -230,7 +229,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 @@ -252,7 +251,7 @@ def test_all_features_cpu_model(tmpdir):
overfit_pct=0.20,
track_grad_norm=2,
print_nan_grads=True,
show_progress_bar=False,
progress_bar_refresh_rate=0,
logger=tutils.get_test_tube_logger(tmpdir),
accumulate_grad_batches=2,
max_epochs=1,
Expand Down Expand Up @@ -349,7 +348,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 @@ -102,7 +102,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 0b84ec0

Please sign in to comment.