Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add enable_autolog_hparams argument to Trainer. #20593

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

duydl
Copy link
Contributor

@duydl duydl commented Feb 18, 2025

What does this PR do?

This PR provides flexibility for users who prefer to handle hyperparameter logging differently.

  • Adds the enable_autolog_hparams argument to Trainer, allowing users to disable automatic logging of hyperparameters.
  • Updates the documentation with examples demonstrating how to manually log hyperparameters when enable_autolog_hparams=False.

Possibly address #19889 .

No breaking changes.

Before submitting
  • Was this discussed/agreed via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

📚 Documentation preview 📚: https://pytorch-lightning--20593.org.readthedocs.build/en/20593/

@github-actions github-actions bot added docs Documentation related pl Generic label for PyTorch Lightning package labels Feb 18, 2025
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79%. Comparing base (a0134d2) to head (2be8ead).

❗ There is a different number of reports uploaded between BASE (a0134d2) and HEAD (2be8ead). Click for more details.

HEAD has 105 uploads less than BASE
Flag BASE (a0134d2) HEAD (2be8ead)
cpu 48 24
lightning 31 15
pytest 27 0
python3.11 12 6
python3.10 12 6
python 6 3
lightning_fabric 11 0
gpu 3 0
python3.12.7 18 9
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #20593     +/-   ##
=========================================
- Coverage      88%      79%     -9%     
=========================================
  Files         267      264      -3     
  Lines       23373    23320     -53     
=========================================
- Hits        20483    18374   -2109     
- Misses       2890     4946   +2056     
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mergify mergify bot removed the has conflicts label Feb 28, 2025
@duydl
Copy link
Contributor Author

duydl commented Feb 28, 2025

@Borda Thank you. Please merge when convenient.

@Borda Borda changed the title Add enable_autolog_hparams argument to Trainer. Add enable_autolog_hparams argument to Trainer. Mar 5, 2025
@Borda
Copy link
Member

Borda commented Mar 10, 2025

@lantiga mind sharing your point of view on this new Trainer's flag?

Copy link
Collaborator

@lantiga lantiga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @duydl, I'm good with the new argument.

@mergify mergify bot added ready PRs ready to be merged and removed has conflicts ready PRs ready to be merged labels Mar 11, 2025
@mergify mergify bot added ready PRs ready to be merged and removed ready PRs ready to be merged labels Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related pl Generic label for PyTorch Lightning package ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants