Skip to content

Commit

Permalink
Fix default ckpt path when logger exists (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuynzereb committed Feb 1, 2020
1 parent 9a6838d commit 784a053
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pytorch_lightning/trainer/callback_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ def configure_checkpoint_callback(self):
if self.checkpoint_callback is True:
# init a default one
if self.logger is not None:
save_dir = (getattr(self.logger, 'save_dir', None) or
getattr(self.logger, '_save_dir', None) or
self.default_save_path)
ckpt_path = os.path.join(
self.default_save_path,
save_dir,
self.logger.name,
f'version_{self.logger.version}',
"checkpoints"
Expand Down

0 comments on commit 784a053

Please sign in to comment.