Skip to content

Deprecate log_gpu_memory off the Trainer constructor #9124

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

Closed

Conversation

ananthsub
Copy link
Contributor

@ananthsub ananthsub commented Aug 26, 2021

What does this PR do?

Fixes #9032

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

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

Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • 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

Did you have fun?

Make sure you had fun coding 🙃

@ananthsub ananthsub added the logging Related to the `LoggerConnector` and `log()` label Aug 26, 2021
@ananthsub ananthsub added the deprecation Includes a deprecation label Aug 26, 2021
@ananthsub ananthsub changed the title Move logging GPU metrics out of the trainer Deprecate log_gpu_memory off Trainer Aug 26, 2021
@ananthsub ananthsub changed the title Deprecate log_gpu_memory off Trainer Deprecate log_gpu_memory off the Trainer constructor Aug 26, 2021
@ananthsub ananthsub added this to the v1.5 milestone Aug 26, 2021
@ananthsub ananthsub marked this pull request as ready for review August 26, 2021 04:55
@codecov
Copy link

codecov bot commented Aug 26, 2021

Codecov Report

Merging #9124 (0bba67b) into master (9d62f24) will decrease coverage by 4%.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #9124    +/-   ##
=======================================
- Coverage      92%     88%    -4%     
=======================================
  Files         175     175            
  Lines       14665   14667     +2     
=======================================
- Hits        13499   12890   -609     
- Misses       1166    1777   +611     

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.

Hey @ananthsub, let's make sure that all issues being worked on are tracked within the sprint.



class LoggerConnector:
def __init__(self, trainer: "pl.Trainer", log_gpu_memory: Optional[str] = None) -> None:
self.trainer = trainer
if log_gpu_memory is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you plan adding log_gpu_memory to the callback in another PR ?

Copy link
Contributor

Choose a reason for hiding this comment

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

If yes, it should be done the other way around.

Copy link
Contributor

@carmocca carmocca left a comment

Choose a reason for hiding this comment

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

Fixes #9032

I don't think that's correct, given the comments in the "Pitch" and "Additional context" sections of that issue still need to be resolved before the removal of log_gpu_memory.

But we can do those in separate PRs

@ananthsub
Copy link
Contributor Author

@tchaton @carmocca yes you're right, there has to be more refactoring before this PR comes. i'll mark this as a draft and work on the other refactors first

@ananthsub ananthsub marked this pull request as draft August 26, 2021 15:44
@ananthsub
Copy link
Contributor Author

Closing this in favor of the stack @daniellepintz is working on

@ananthsub ananthsub closed this Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Includes a deprecation has conflicts logging Related to the `LoggerConnector` and `log()`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revamp Device Stats Logging
3 participants