File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -594,12 +594,14 @@ def test_progress_bar_max_val_check_interval(
594
594
val_checks_per_epoch = total_train_batches / val_check_batch
595
595
total_val_batches = total_val_samples // (val_batch_size * world_size )
596
596
pbar_callback = trainer .progress_bar_callback
597
- assert pbar_callback .val_progress_bar .n == total_val_batches
598
- assert pbar_callback .val_progress_bar .total == total_val_batches
599
- total_val_batches = total_val_batches * val_checks_per_epoch
600
- assert pbar_callback .main_progress_bar .n == total_train_batches + total_val_batches
601
- assert pbar_callback .main_progress_bar .total == total_train_batches + total_val_batches
602
- assert pbar_callback .is_enabled == trainer .is_global_zero
597
+
598
+ if trainer .is_global_zero :
599
+ assert pbar_callback .val_progress_bar .n == total_val_batches
600
+ assert pbar_callback .val_progress_bar .total == total_val_batches
601
+ total_val_batches = total_val_batches * val_checks_per_epoch
602
+ assert pbar_callback .main_progress_bar .n == total_train_batches + total_val_batches
603
+ assert pbar_callback .main_progress_bar .total == total_train_batches + total_val_batches
604
+ assert pbar_callback .is_enabled
603
605
604
606
605
607
def test_get_progress_bar_metrics (tmpdir : str ):
You can’t perform that action at this time.
0 commit comments