-
Notifications
You must be signed in to change notification settings - Fork 3.5k
LightningCLI documentation improvements #8303
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8303 +/- ##
=======================================
- Coverage 92% 88% -4%
=======================================
Files 213 214 +1
Lines 13791 13914 +123
=======================================
- Hits 12732 12227 -505
- Misses 1059 1687 +628 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
Given the above python trainer.py --config default_config.yaml -optimizer.class_path=torch.optim.Adam --optimizer.init_args.lr=0.01 If so, then it would be great to show people that (with the example a config that would have the optimizer stuff setup that they could edit). Then the thing I really would love to see in in the docs is something telling me how to make that default config file a default, so I don't need to pass it in each time! Then I can just register python trainer.py --optimizer.class_path=torch.optim.Adam --optimizer.init_args.lr=0.01 or to use all of the defaults! python trainer.py where I can then still use any other config file with |
This is already explained. There is a whole section for it with examples.
Will add this. |
Hello @mauvilsa! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-07-08 06:33:52 UTC |
Done |
@mauvilsa I believe there has been a bad merge. |
I have no idea what I did. But now it is fixed. |
Co-authored-by: Adrian Wälchli <[email protected]>
What does this PR do?
It includes several improvements to the documentation of
LightningCLI
. There is now a section that explains the use of command line arguments as discussed in #8093. It also explains the use of defaults for parameters that have a class as type hint. And includes some notes about reproducibility.The version of jsonargparse is also bumped. With this now it is possible to configure subclasses via individual command line arguments without having to create a dictionary.
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃