-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7543 +/- ##
========================================
- Coverage 92% 88% -5%
========================================
Files 217 202 -15
Lines 14328 13082 -1246
========================================
- Hits 13222 11481 -1741
- Misses 1106 1601 +495 |
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 |
for more information, see https://pre-commit.ci
@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) |
There was a problem hiding this comment.
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
for more information, see https://pre-commit.ci
ping for this 👀 |
ping for this 👀 I still cannot use other loggers with CLI. |
What does this PR do?
Fixes #7542
logger.log_dir
andtrainer.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 introduceslogger.experiment_dir
for all loggers and deprecates the oldlogger.log_dir
property.TODO:
Before submitting
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:
Did you have fun?
Make sure you had fun coding 🙃