Skip to content

Commit

Permalink
add default_save_path property to Callback
Browse files Browse the repository at this point in the history
  • Loading branch information
hadim committed Feb 22, 2020
1 parent 87c6835 commit 5328e7b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pytorch_lightning/callbacks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ def trainer(self):
assert self._trainer is not None, _NO_TRAINER_ERROR_MSG
return self._trainer

@property
def default_save_path(self):
"""Trainer default save path.
"""
return self.trainer.default_save_path

def set_trainer(self, trainer):
"""Make a link to the trainer, so different things like `trainer.current_epoch`,
`trainer.batch_idx`, `trainer.global_step` can be used."""
Expand Down

0 comments on commit 5328e7b

Please sign in to comment.