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

[CLI] Shorthand notation to instantiate optimizers and lr schedulers [2/3] #9565

Merged
merged 10 commits into from
Sep 17, 2021

Conversation

carmocca
Copy link
Contributor

@carmocca carmocca commented Sep 16, 2021

What does this PR do?

Fixes #7576
Implements the feature request in jsonargparse: omni-us/jsonargparse#84
Docs: https://129938-178626720-gh.circle-artifacts.com/0/html/common/lightning_cli.html#optimizers-and-learning-rate-scheduler

See the docs changes for more context.

Does your PR introduce any breaking changes? If yes, please list them.

None

Before submitting

  • Was this discussed/approved 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 internal minor changes/refactorings)

PR review

  • 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

@carmocca carmocca added the argparse (removed) Related to argument parsing (argparse, Hydra, ...) label Sep 16, 2021
@carmocca carmocca added this to the v1.5 milestone Sep 16, 2021
@carmocca carmocca self-assigned this Sep 16, 2021
@carmocca carmocca added the feature Is an improvement or enhancement label Sep 16, 2021
@carmocca carmocca changed the title [CLI] Shorthand notation to instantiate optimizers and lr schedulers [CLI] Shorthand notation to instantiate optimizers and lr schedulers [2/3] Sep 16, 2021
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

Love it !

@carmocca carmocca enabled auto-merge (squash) September 16, 2021 16:03
@codecov
Copy link

codecov bot commented Sep 16, 2021

Codecov Report

Merging #9565 (8e87359) into master (d2ca81b) will increase coverage by 0%.
The diff coverage is 93%.

❗ Current head 8e87359 differs from pull request most recent head d8a0e96. Consider uploading reports for the commit d8a0e96 to get more accurate results

@@          Coverage Diff           @@
##           master   #9565   +/-   ##
======================================
  Coverage      93%     93%           
======================================
  Files         180     180           
  Lines       15094   15165   +71     
======================================
+ Hits        14021   14088   +67     
- Misses       1073    1077    +4     

docs/source/common/lightning_cli.rst Show resolved Hide resolved
docs/source/common/lightning_cli.rst Show resolved Hide resolved
@mergify mergify bot added the ready PRs ready to be merged label Sep 17, 2021
Copy link
Contributor

@SeanNaren SeanNaren left a comment

Choose a reason for hiding this comment

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

Not super familiar with the LightningCLI codebase but looks good!

@carmocca carmocca merged commit bbcb977 into master Sep 17, 2021
@carmocca carmocca deleted the feat/cli-shorthand-optimizers branch September 17, 2021 17:00
@@ -7,6 +7,6 @@ torchtext>=0.7
onnx>=1.7.0
onnxruntime>=1.3.0
hydra-core>=1.0
jsonargparse[signatures]>=3.19.0
jsonargparse[signatures]>=3.19.3
Copy link
Contributor

Choose a reason for hiding this comment

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

why was this change made?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This PR requires a bugfix upstream to work:

omni-us/jsonargparse#90

The patch was released with 3.19.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
argparse (removed) Related to argument parsing (argparse, Hydra, ...) feature Is an improvement or enhancement ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Easier way to configure optimizers and schedulers in the CLI
5 participants