Skip to content

Commit a2c6057

Browse files
s-rogtchaton
andauthored
Update seed_everything() (#6843)
* Update seed.py * Update pytorch_lightning/utilities/seed.py Co-authored-by: thomas chaton <[email protected]> * Update seed.py * Update seed.py * Update seed.py Co-authored-by: thomas chaton <[email protected]>
1 parent b7a22ba commit a2c6057

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pytorch_lightning/utilities/seed.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ def seed_everything(seed: Optional[int] = None) -> int:
5353
rank_zero_warn(f"{seed} is not in bounds, numpy accepts from {min_seed_value} to {max_seed_value}")
5454
seed = _select_seed_randomly(min_seed_value, max_seed_value)
5555

56+
# using `log.info` instead of `rank_zero_info`,
57+
# so users can verify the seed is properly set in distributed training.
5658
log.info(f"Global seed set to {seed}")
5759
os.environ["PL_GLOBAL_SEED"] = str(seed)
5860
random.seed(seed)

0 commit comments

Comments
 (0)