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

_launch refactor and types [1/n] #7232

Merged
merged 9 commits into from
Apr 28, 2021
Merged

_launch refactor and types [1/n] #7232

merged 9 commits into from
Apr 28, 2021

Conversation

carmocca
Copy link
Contributor

@carmocca carmocca commented Apr 27, 2021

What does this PR do?

Fixes #7242

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?
  • [n/a] 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?
  • [n/a] 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 bug Something isn't working refactor labels Apr 27, 2021
@carmocca carmocca added this to the v1.3 milestone Apr 27, 2021
@carmocca carmocca self-assigned this Apr 27, 2021
@carmocca carmocca changed the title _fit_impl refactor and types _fit_impl refactor and types [1/n] Apr 27, 2021
@codecov
Copy link

codecov bot commented Apr 27, 2021

Codecov Report

Merging #7232 (69e7537) into master (e147127) will decrease coverage by 2%.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #7232    +/-   ##
=======================================
- Coverage      91%     90%    -2%     
=======================================
  Files         198     199     +1     
  Lines       12725   13216   +491     
=======================================
+ Hits        11633   11859   +226     
- Misses       1092    1357   +265     

@mergify mergify bot removed the has conflicts label Apr 27, 2021
@carmocca carmocca requested a review from awaelchli April 27, 2021 13:52
@carmocca carmocca mentioned this pull request Apr 27, 2021
9 tasks
pytorch_lightning/tuner/batch_size_scaling.py Outdated Show resolved Hide resolved
@@ -860,14 +830,50 @@ def run_sanity_check(self, ref_model):
# prevents sanity check to affect random sampling in training
reset_seed()

def fit(
Copy link
Contributor

Choose a reason for hiding this comment

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

don't we want to move this up? It would be nice if the entry points fit, validate, test came first.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree. Let's try to organise, so it is simple to follow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll do this in a separate PR. Keeping them where they are for now so they are together

@@ -860,14 +830,50 @@ def run_sanity_check(self, ref_model):
# prevents sanity check to affect random sampling in training
reset_seed()

def fit(
Copy link
Contributor

Choose a reason for hiding this comment

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

Agree. Let's try to organise, so it is simple to follow.

pytorch_lightning/trainer/trainer.py Show resolved Hide resolved
@carmocca carmocca changed the title _fit_impl refactor and types [1/n] _launch refactor and types [1/n] Apr 28, 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.

LGTM !

pytorch_lightning/trainer/trainer.py Outdated Show resolved Hide resolved
@pep8speaks
Copy link

pep8speaks commented Apr 28, 2021

Hello @carmocca! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-04-28 14:36:20 UTC

@carmocca carmocca enabled auto-merge (squash) April 28, 2021 14:48
@carmocca carmocca added the ready PRs ready to be merged label Apr 28, 2021
@tchaton tchaton disabled auto-merge April 28, 2021 14:53
@carmocca carmocca merged commit bdc4272 into master Apr 28, 2021
@carmocca carmocca deleted the use-fit-impl branch April 28, 2021 15:41
@@ -408,36 +409,13 @@ def __init__(
# Callback system
self.on_init_end()

def fit(
def _launch(
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit : I prefer _run or _execute vs launch, which I associate more with distributed launch/process creation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bit late as it is already merged, but if you want to open a PR with the renaming change, that's fine by me! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready PRs ready to be merged refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Trainer] Use name mangling to allow for subclassing
5 participants