Skip to content

Conversation

KAVYANSHTYAGI
Copy link
Contributor

@KAVYANSHTYAGI KAVYANSHTYAGI commented Sep 4, 2025

What does this PR do?

Updates Fabric’s seed_everything to respect the verbose=False flag when no seed is provided.
Previously, even with verbose=False, the function emitted a warning ("No seed found, seed set to 0"). This PR ensures that:

  • When verbose=False, no warnings or logs are emitted if the seed defaults to 0.
  • When verbose=True, the warning is still shown for visibility.
  • A regression test was added to verify that no warnings are emitted when verbose=False.
  • The Fabric changelog was updated to document this change.

Motivation and context

  • Aligns behavior of seed_everything with the meaning of the verbose flag across the codebase.
  • Prevents noisy logs in CI/CD pipelines and notebooks where warnings may be treated as errors.
  • Improves UX consistency and reduces confusion when users expect verbose=False to silence outputs.

Dependencies

None


Does your PR introduce any breaking changes?

No — functionality is unchanged, only logging behavior is adjusted.


PR review

Community members are welcome to review this PR. The change is self-contained and low risk.


Checklist

  • PR does only one thing
  • Added necessary regression test (test_seed_everything_non_verbose_no_warning)
  • Updated Fabric changelog

@github-actions github-actions bot added the fabric lightning.fabric.Fabric label Sep 4, 2025
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87%. Comparing base (cdc0db4) to head (663831c).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21161   +/-   ##
=======================================
  Coverage      87%      87%           
=======================================
  Files         269      269           
  Lines       23595    23596    +1     
=======================================
+ Hits        20579    20580    +1     
  Misses       3016     3016           

@Borda Borda merged commit d6499ed into Lightning-AI:master Sep 4, 2025
121 of 122 checks passed
Borda pushed a commit that referenced this pull request Sep 4, 2025
…#21161)

* Update test_mlflow.py
* test_mlflow.py
* Respect verbose flag in seed_everything
* Apply suggestions from code review

---------

Co-authored-by: Jirka Borovec <[email protected]>

(cherry picked from commit d6499ed)
lantiga pushed a commit that referenced this pull request Sep 5, 2025
…#21161)

* Update test_mlflow.py
* test_mlflow.py
* Respect verbose flag in seed_everything
* Apply suggestions from code review

---------

Co-authored-by: Jirka Borovec <[email protected]>

(cherry picked from commit d6499ed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fabric lightning.fabric.Fabric
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants