mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-28 13:20:31 +08:00
Fix default ckpt path when logger exists (#771)
This commit is contained in:
1 parent
9a6838d349
commit
784a053793
1 file changed
+4
-1
@@ -23,8 +23,11 @@ class TrainerCallbackConfigMixin(ABC):
|
||||
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"
|
||||
|
||||
Reference in new issue
Block a user