We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f47d15e commit 38c29eeCopy full SHA for 38c29ee
src/lightning/fabric/utilities/seed.py
@@ -91,7 +91,9 @@ def pl_worker_init_function(worker_id: int, rank: Optional[int] = None) -> None:
91
92
"""
93
# 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."
+ assert (
95
+ "PL_GLOBAL_SEED" in os.environ
96
+ ), "`seed_everything(seed, workers=True)` must be called before training to use this function."
97
global_rank = rank if rank is not None else rank_zero_only.rank
98
process_seed = int(os.environ["PL_GLOBAL_SEED"])
99
# back out the base seed so we can use all the bits
0 commit comments