From 5328e7b1c2cce9e3db5114915844acf5217128e8 Mon Sep 17 00:00:00 2001 From: Hadrien Mary Date: Wed, 19 Feb 2020 11:46:59 -0500 Subject: [PATCH] add default_save_path property to Callback --- pytorch_lightning/callbacks/base.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pytorch_lightning/callbacks/base.py b/pytorch_lightning/callbacks/base.py index 413189eb59b92f..8c0c3b3dd8477f 100644 --- a/pytorch_lightning/callbacks/base.py +++ b/pytorch_lightning/callbacks/base.py @@ -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."""