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

standardize log_dir for loggers #7543

Closed
wants to merge 40 commits into from
Closed

standardize log_dir for loggers #7543

wants to merge 40 commits into from

Conversation

awaelchli
Copy link
Contributor

@awaelchli awaelchli commented May 14, 2021

What does this PR do?

Fixes #7542

logger.log_dir and trainer.log_dir was not consistently pointing to the experiment folder. It means user code cannot be logger agnostic and also the CLI has no fixed place where config files land. This PR introduces logger.experiment_dir for all loggers and deprecates the old logger.log_dir property.

TODO:

  • update tests
  • deprecation message

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 update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
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 🙃

@awaelchli awaelchli added the logger Related to the Loggers label May 14, 2021
@awaelchli awaelchli added this to the v1.3.x milestone May 14, 2021
@awaelchli awaelchli added the bug Something isn't working label May 14, 2021
@codecov
Copy link

codecov bot commented May 14, 2021

Codecov Report

Merging #7543 (5b019e8) into master (2d682fa) will decrease coverage by 5%.
The diff coverage is 98%.

❗ Current head 5b019e8 differs from pull request most recent head d571d04. Consider uploading reports for the commit d571d04 to get more accurate results

@@           Coverage Diff            @@
##           master   #7543     +/-   ##
========================================
- Coverage      92%     88%     -5%     
========================================
  Files         217     202     -15     
  Lines       14328   13082   -1246     
========================================
- Hits        13222   11481   -1741     
- Misses       1106    1601    +495     

@pep8speaks
Copy link

pep8speaks commented May 14, 2021

Hello @awaelchli! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

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

Comment last updated at 2021-07-24 17:12:49 UTC

@property
def experiment_dir(self):
dirpath = self.logger.experiment_dir if self.logger is not None else self.default_root_dir
dirpath = self.accelerator.broadcast(dirpath)
Copy link
Contributor

Choose a reason for hiding this comment

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

this broadcast should be done once so we're not calling this on every property access

@tshu-w
Copy link
Contributor

tshu-w commented Jul 6, 2021

ping for this 👀

@Borda Borda modified the milestones: v1.3.x, v1.4 Jul 6, 2021
@edenlightning edenlightning modified the milestones: v1.4, v1.3.x Jul 6, 2021
@edenlightning edenlightning modified the milestones: v1.3.x, v1.4.x Jul 21, 2021
@tshu-w
Copy link
Contributor

tshu-w commented Aug 5, 2021

ping for this 👀 I still cannot use other loggers with CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working logger Related to the Loggers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cli with TestTubeLogger does not save the configuration file to the version folder
6 participants