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 e9127f4 commit c127458Copy full SHA for c127458
src/lightning/fabric/utilities/seed.py
@@ -92,11 +92,7 @@ def pl_worker_init_function(worker_id: int, rank: Optional[int] = None) -> None:
92
"""
93
# implementation notes: https://github.com/pytorch/pytorch/issues/5059#issuecomment-817392562
94
global_rank = rank if rank is not None else rank_zero_only.rank
95
- env_seed = os.environ.get("PL_GLOBAL_SEED", None)
96
- if env_seed is None:
97
- env_seed = "0"
98
- rank_zero_warn(f"No seed found, worker seed set to {env_seed}")
99
- process_seed = int(env_seed)
+ process_seed = torch.initial_seed()
100
# back out the base seed so we can use all the bits
101
base_seed = process_seed - worker_id
102
log.debug(
0 commit comments