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

[FEAT] logging refactors 1/n #4439

Merged
merged 28 commits into from
Nov 2, 2020
Merged

[FEAT] logging refactors 1/n #4439

merged 28 commits into from
Nov 2, 2020

Conversation

tchaton
Copy link
Contributor

@tchaton tchaton commented Oct 30, 2020

What does this PR do?

This PR start introducing new changes for refactoring logging.

Fixes #4449 #4439

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • 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? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@tchaton tchaton changed the title [FEAT] Add new object for logging. No activated yet. [FEAT] Add new object for logging. Not activated yet. Oct 30, 2020
@pep8speaks
Copy link

pep8speaks commented Oct 30, 2020

Hello @tchaton! Thanks for updating this PR.

Line 62:53: E231 missing whitespace after ':'

Line 86:121: E501 line too long (133 > 120 characters)
Line 87:121: E501 line too long (133 > 120 characters)
Line 181:121: E501 line too long (123 > 120 characters)
Line 244:121: E501 line too long (126 > 120 characters)
Line 248:121: E501 line too long (131 > 120 characters)

Comment last updated at 2020-11-02 18:47:07 UTC

@tchaton tchaton changed the title [FEAT] Add new object for logging. Not activated yet. [FEAT] Refactor Logging. Not activated yet. Oct 30, 2020
Copy link
Member

@justusschock justusschock left a comment

Choose a reason for hiding this comment

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

I like this really much. It makes everything much easier to follow!

I left some comments here.
Once this is finished, could you also go over the files as well and add docstrings for all the functions and maybe some type hints as well? This would enhance the readability even further :)

pytorch_lightning/core/lightning.py Outdated Show resolved Hide resolved
pytorch_lightning/trainer/logging.py Outdated Show resolved Hide resolved
pytorch_lightning/trainer/logging.py Outdated Show resolved Hide resolved
pytorch_lightning/trainer/training_loop.py Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 30, 2020

Codecov Report

Merging #4439 into master will decrease coverage by 1%.
The diff coverage is 84%.

@@           Coverage Diff           @@
##           master   #4439    +/-   ##
=======================================
- Coverage      93%     92%    -1%     
=======================================
  Files         113     116     +3     
  Lines        8198    8700   +502     
=======================================
+ Hits         7633    8047   +414     
- Misses        565     653    +88     

@williamFalcon
Copy link
Contributor

mind adding it to the title so we can track that this is partial?

ref: logging refactors 1/n

@edenlightning edenlightning added this to the 1.0.x milestone Oct 30, 2020
@tchaton tchaton changed the title [FEAT] Refactor Logging. Not activated yet. [FEAT] logging refactors 1/n Oct 30, 2020
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.

Overall this is incredibly neat @tchaton!

Copy link
Member

@justusschock justusschock left a comment

Choose a reason for hiding this comment

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

Again, I really like this.

Some minor comments, but nothing major!

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.

It's a lot of code at once, however I've reviewed this multiple times and it looks clear and consistent. Let's get this over the finish line :)

@tchaton tchaton added the ready PRs ready to be merged label Nov 2, 2020
Copy link
Contributor

@teddykoker teddykoker left a comment

Choose a reason for hiding this comment

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

LGTM, awesome work Thomas :)

@tchaton tchaton merged commit ac3f739 into master Nov 2, 2020
@tchaton tchaton deleted the feat/epoch_loop_result_objs branch November 2, 2020 20:51
@Borda Borda modified the milestones: 1.0.x, 1.1 Nov 4, 2020
rohitgr7 pushed a commit that referenced this pull request Nov 21, 2020
* introducing new logging object

* typo

* typo

* Update pytorch_lightning/trainer/logging.py

Co-authored-by: Justus Schock <[email protected]>

* Update pytorch_lightning/trainer/logging.py

Co-authored-by: Justus Schock <[email protected]>

* update on comments

* update on comments

* add more doctstring

* Update pytorch_lightning/core/lightning.py

Co-authored-by: Sean Naren <[email protected]>

* resolve on comments

* solve pyright

* Update pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py

Co-authored-by: Justus Schock <[email protected]>

* update on comments

* Update pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py

Co-authored-by: Sean Naren <[email protected]>

* update on comments

Co-authored-by: Justus Schock <[email protected]>
Co-authored-by: Sean Naren <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready PRs ready to be merged refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: 'dict' object has no attribute 'get_epoch_log_metrics'
8 participants