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

Restructure parsing flow in the LightningCLI #8721

Merged
merged 6 commits into from
Aug 9, 2021
Merged

Conversation

carmocca
Copy link
Contributor

@carmocca carmocca commented Aug 4, 2021

What does this PR do?

Splitting of some of the changes from #7508

  • Breaking changes listed below
  • Make seed_everything optional
  • Typing fixes
  • Docs fixes
  • Improve config handling

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

LightningCLI is beta, but these are the non-BC changes

  • init_parser now returns the parser instance.
  • add_core_arguments_to_parser, parse_arguments now take a parser argument
  • instantiate_trainer now takes a config and a list of callbacks.
  • Split add_core_arguments_to_parser into add_default_arguments_to_parser + add_core_arguments_to_parser

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

cc @mauvilsa

@carmocca carmocca added refactor argparse (removed) Related to argument parsing (argparse, Hydra, ...) labels Aug 4, 2021
@carmocca carmocca added this to the v1.5 milestone Aug 4, 2021
@carmocca carmocca self-assigned this Aug 4, 2021
@codecov
Copy link

codecov bot commented Aug 4, 2021

Codecov Report

Merging #8721 (f4e5bee) into master (963c267) will decrease coverage by 4%.
The diff coverage is 97%.

@@           Coverage Diff           @@
##           master   #8721    +/-   ##
=======================================
- Coverage      93%     89%    -4%     
=======================================
  Files         169     169            
  Lines       14072   14073     +1     
=======================================
- Hits        13043   12468   -575     
- Misses       1029    1605   +576     

@carmocca carmocca marked this pull request as ready for review August 4, 2021 18:39
@mergify mergify bot added the has conflicts label Aug 4, 2021
@mergify mergify bot removed the has conflicts label Aug 4, 2021
@mergify mergify bot added the ready PRs ready to be merged label Aug 9, 2021
@carmocca carmocca enabled auto-merge (squash) August 9, 2021 11:51
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.

LGTM !

@carmocca carmocca merged commit f1cc6e3 into master Aug 9, 2021
@carmocca carmocca deleted the feat/cli-restructuring branch August 9, 2021 15:26
four4fish pushed a commit to four4fish/pytorch-lightning that referenced this pull request Aug 16, 2021
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, ...) ready PRs ready to be merged refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants