Skip to content

Commit c4cbff9

Browse files
committed
Update test_dataloaders.py
1 parent deaf510 commit c4cbff9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/trainer/test_dataloaders.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,14 +1112,6 @@ def test_dataloaders_load_only_once_val_interval(tmpdir):
11121112
expected_sequence = [
11131113
'val_dataloader',
11141114
'train_dataloader',
1115-
# This has subsequent calls to val_dataloader
1116-
# because the training loop runs the evaluation loop,
1117-
# which reloads the val dataloader again.
1118-
# We cannot yet rely on trainer.current_epoch=0 to skip reloading
1119-
# the val dataloader on the first epoch because this only tracks the training epoch
1120-
# meaning multiple passes through the validation data within a single training epoch
1121-
# would not have the datalodaer reloaded.
1122-
# This breaks the assumption behind reload_dataloaders_every_epoch=True
11231115
'val_dataloader',
11241116
'val_dataloader',
11251117
'val_dataloader',
@@ -1244,6 +1236,14 @@ def validation_step(self, batch, batch_idx):
12441236
expected_sequence = [
12451237
'train_dataloader',
12461238
'val_dataloader',
1239+
# This has subsequent calls to val_dataloader
1240+
# because the training loop runs the evaluation loop,
1241+
# which reloads the val dataloader again.
1242+
# We cannot yet rely on trainer.current_epoch=0 to skip reloading
1243+
# the val dataloader on the first epoch because this only tracks the training epoch
1244+
# meaning multiple passes through the validation data within a single training epoch
1245+
# would not have the datalodaer reloaded.
1246+
# This breaks the assumption behind reload_dataloaders_every_epoch=True
12471247
'val_dataloader',
12481248
'train_dataloader',
12491249
'val_dataloader',

0 commit comments

Comments
 (0)