Skip to content

Commit 0b84ec0

Browse files
author
Gerard Bentley
committed
remove show_progress_bar from other tests
1 parent d85273b commit 0b84ec0

5 files changed

+17
-25
lines changed

tests/test_amp.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def test_amp_single_gpu(tmpdir):
2222

2323
trainer_options = dict(
2424
default_save_path=tmpdir,
25-
show_progress_bar=True,
2625
max_epochs=1,
2726
gpus=1,
2827
distributed_backend='ddp',
@@ -45,7 +44,6 @@ def test_no_amp_single_gpu(tmpdir):
4544

4645
trainer_options = dict(
4746
default_save_path=tmpdir,
48-
show_progress_bar=True,
4947
max_epochs=1,
5048
gpus=1,
5149
distributed_backend='dp',
@@ -71,7 +69,6 @@ def test_amp_gpu_ddp(tmpdir):
7169

7270
trainer_options = dict(
7371
default_save_path=tmpdir,
74-
show_progress_bar=True,
7572
max_epochs=1,
7673
gpus=2,
7774
distributed_backend='ddp',
@@ -97,7 +94,6 @@ def test_amp_gpu_ddp_slurm_managed(tmpdir):
9794
model = LightningTestModel(hparams)
9895

9996
trainer_options = dict(
100-
show_progress_bar=True,
10197
max_epochs=1,
10298
gpus=[0],
10399
distributed_backend='ddp',
@@ -135,7 +131,7 @@ def test_cpu_model_with_amp(tmpdir):
135131

136132
trainer_options = dict(
137133
default_save_path=tmpdir,
138-
show_progress_bar=False,
134+
progress_bar_refresh_rate=0,
139135
logger=tutils.get_test_tube_logger(tmpdir),
140136
max_epochs=1,
141137
train_percent_check=0.4,

tests/test_cpu_models.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def test_early_stopping_cpu_model(tmpdir):
2727
overfit_pct=0.20,
2828
track_grad_norm=2,
2929
print_nan_grads=True,
30-
show_progress_bar=True,
3130
logger=tutils.get_test_tube_logger(tmpdir),
3231
train_percent_check=0.1,
3332
val_percent_check=0.1,
@@ -49,7 +48,7 @@ def test_lbfgs_cpu_model(tmpdir):
4948
default_save_path=tmpdir,
5049
max_epochs=2,
5150
print_nan_grads=True,
52-
show_progress_bar=False,
51+
progress_bar_refresh_rate=0,
5352
weights_summary='top',
5453
train_percent_check=1.0,
5554
val_percent_check=0.2,
@@ -69,7 +68,7 @@ def test_default_logger_callbacks_cpu_model(tmpdir):
6968
gradient_clip_val=1.0,
7069
overfit_pct=0.20,
7170
print_nan_grads=True,
72-
show_progress_bar=False,
71+
progress_bar_refresh_rate=0,
7372
train_percent_check=0.01,
7473
val_percent_check=0.01,
7574
)
@@ -97,7 +96,7 @@ def test_running_test_after_fitting(tmpdir):
9796

9897
trainer_options = dict(
9998
default_save_path=tmpdir,
100-
show_progress_bar=False,
99+
progress_bar_refresh_rate=0,
101100
max_epochs=4,
102101
train_percent_check=0.4,
103102
val_percent_check=0.2,
@@ -135,7 +134,7 @@ class CurrentTestModel(LightTrainDataloader, LightTestMixin, TestModelBase):
135134
checkpoint = tutils.init_checkpoint_callback(logger)
136135

137136
trainer_options = dict(
138-
show_progress_bar=False,
137+
progress_bar_refresh_rate=0,
139138
max_epochs=1,
140139
train_percent_check=0.4,
141140
val_percent_check=0.2,
@@ -230,7 +229,7 @@ def test_cpu_model(tmpdir):
230229

231230
trainer_options = dict(
232231
default_save_path=tmpdir,
233-
show_progress_bar=False,
232+
progress_bar_refresh_rate=0,
234233
logger=tutils.get_test_tube_logger(tmpdir),
235234
max_epochs=1,
236235
train_percent_check=0.4,
@@ -252,7 +251,7 @@ def test_all_features_cpu_model(tmpdir):
252251
overfit_pct=0.20,
253252
track_grad_norm=2,
254253
print_nan_grads=True,
255-
show_progress_bar=False,
254+
progress_bar_refresh_rate=0,
256255
logger=tutils.get_test_tube_logger(tmpdir),
257256
accumulate_grad_batches=2,
258257
max_epochs=1,
@@ -349,7 +348,7 @@ def test_single_gpu_model(tmpdir):
349348

350349
trainer_options = dict(
351350
default_save_path=tmpdir,
352-
show_progress_bar=False,
351+
progress_bar_refresh_rate=0,
353352
max_epochs=1,
354353
train_percent_check=0.1,
355354
val_percent_check=0.1,

tests/test_gpu_models.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def test_multi_gpu_model_ddp2(tmpdir):
3232
model, hparams = tutils.get_model()
3333
trainer_options = dict(
3434
default_save_path=tmpdir,
35-
show_progress_bar=True,
3635
max_epochs=1,
3736
train_percent_check=0.4,
3837
val_percent_check=0.2,
@@ -55,7 +54,7 @@ def test_multi_gpu_model_ddp(tmpdir):
5554
model, hparams = tutils.get_model()
5655
trainer_options = dict(
5756
default_save_path=tmpdir,
58-
show_progress_bar=False,
57+
progress_bar_refresh_rate=0,
5958
max_epochs=1,
6059
train_percent_check=0.4,
6160
val_percent_check=0.2,
@@ -76,7 +75,7 @@ def test_ddp_all_dataloaders_passed_to_fit(tmpdir):
7675

7776
model, hparams = tutils.get_model()
7877
trainer_options = dict(default_save_path=tmpdir,
79-
show_progress_bar=False,
78+
progress_bar_refresh_rate=0,
8079
max_epochs=1,
8180
train_percent_check=0.4,
8281
val_percent_check=0.2,
@@ -209,7 +208,7 @@ def test_multi_gpu_none_backend(tmpdir):
209208
model, hparams = tutils.get_model()
210209
trainer_options = dict(
211210
default_save_path=tmpdir,
212-
show_progress_bar=False,
211+
progress_bar_refresh_rate=0,
213212
max_epochs=1,
214213
train_percent_check=0.1,
215214
val_percent_check=0.1,
@@ -230,7 +229,7 @@ def test_multi_gpu_model_dp(tmpdir):
230229
model, hparams = tutils.get_model()
231230
trainer_options = dict(
232231
default_save_path=tmpdir,
233-
show_progress_bar=False,
232+
progress_bar_refresh_rate=0,
234233
distributed_backend='dp',
235234
max_epochs=1,
236235
train_percent_check=0.1,

tests/test_restore_models.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_running_test_pretrained_model_ddp(tmpdir):
3434
checkpoint = tutils.init_checkpoint_callback(logger)
3535

3636
trainer_options = dict(
37-
show_progress_bar=False,
37+
progress_bar_refresh_rate=0,
3838
max_epochs=1,
3939
train_percent_check=0.4,
4040
val_percent_check=0.2,
@@ -82,7 +82,7 @@ def test_running_test_pretrained_model(tmpdir):
8282
checkpoint = tutils.init_checkpoint_callback(logger)
8383

8484
trainer_options = dict(
85-
show_progress_bar=False,
85+
progress_bar_refresh_rate=0,
8686
max_epochs=4,
8787
train_percent_check=0.4,
8888
val_percent_check=0.2,
@@ -115,7 +115,7 @@ def test_load_model_from_checkpoint(tmpdir):
115115
model = LightningTestModel(hparams)
116116

117117
trainer_options = dict(
118-
show_progress_bar=False,
118+
progress_bar_refresh_rate=0,
119119
max_epochs=2,
120120
train_percent_check=0.4,
121121
val_percent_check=0.2,
@@ -168,7 +168,6 @@ def test_running_test_pretrained_model_dp(tmpdir):
168168
checkpoint = tutils.init_checkpoint_callback(logger)
169169

170170
trainer_options = dict(
171-
show_progress_bar=True,
172171
max_epochs=4,
173172
train_percent_check=0.4,
174173
val_percent_check=0.2,
@@ -206,7 +205,6 @@ def test_dp_resume(tmpdir):
206205
model = LightningTestModel(hparams)
207206

208207
trainer_options = dict(
209-
show_progress_bar=True,
210208
max_epochs=3,
211209
gpus=2,
212210
distributed_backend='dp',
@@ -333,7 +331,7 @@ def test_model_saving_loading(tmpdir):
333331

334332
def test_load_model_with_missing_hparams(tmpdir):
335333
trainer_options = dict(
336-
show_progress_bar=False,
334+
progress_bar_refresh_rate=0,
337335
max_epochs=1,
338336
checkpoint_callback=ModelCheckpoint(tmpdir, save_top_k=-1),
339337
logger=False,

tests/trainer/test_callbacks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def on_test_end(self, trainer, pl_module):
102102
'max_epochs': 1,
103103
'val_percent_check': 0.1,
104104
'train_percent_check': 0.2,
105-
'show_progress_bar': False
105+
'progress_bar_refresh_rate': 0
106106
}
107107

108108
assert not test_callback.on_init_start_called

0 commit comments

Comments
 (0)