Skip to content

Commit 1af42d7

Browse files
authored
fix 1.9 test (#7441)
1 parent 987530c commit 1af42d7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/trainer/test_dataloaders.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,8 +803,12 @@ def _user_worker_init_fn(_):
803803
pass
804804

805805

806+
@RunIf(max_torch="1.8.9")
806807
def test_missing_worker_init_fn():
807-
""" Test that naive worker seed initialization leads to undesired random state in subprocesses. """
808+
"""
809+
Test that naive worker seed initialization leads to undesired random state in subprocesses.
810+
PyTorch 1.9+ does not have this issue.
811+
"""
808812
dataset = NumpyRandomDataset()
809813

810814
seed_everything(0)

0 commit comments

Comments
 (0)