Skip to content

Commit 38c29ee

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f47d15e commit 38c29ee

File tree

1 file changed

+3
-1
lines changed
  • src/lightning/fabric/utilities

1 file changed

+3
-1
lines changed

src/lightning/fabric/utilities/seed.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ def pl_worker_init_function(worker_id: int, rank: Optional[int] = None) -> None:
9191
9292
"""
9393
# implementation notes: https://github.com/pytorch/pytorch/issues/5059#issuecomment-817392562
94-
assert "PL_GLOBAL_SEED" in os.environ, "`seed_everything(seed, workers=True)` must be called before training to use this function."
94+
assert (
95+
"PL_GLOBAL_SEED" in os.environ
96+
), "`seed_everything(seed, workers=True)` must be called before training to use this function."
9597
global_rank = rank if rank is not None else rank_zero_only.rank
9698
process_seed = int(os.environ["PL_GLOBAL_SEED"])
9799
# back out the base seed so we can use all the bits

0 commit comments

Comments
 (0)