diff --git a/src/pytorch_lightning/loggers/csv_logs.py b/src/pytorch_lightning/loggers/csv_logs.py index 86e224881c4522..202f35676a363e 100644 --- a/src/pytorch_lightning/loggers/csv_logs.py +++ b/src/pytorch_lightning/loggers/csv_logs.py @@ -133,7 +133,7 @@ def __init__( flush_logs_every_n_steps: int = 100, ): super().__init__() - self._save_dir = save_dir + self._save_dir = os.fspath(save_dir) self._name = name or "" self._version = version self._prefix = prefix diff --git a/src/pytorch_lightning/loggers/tensorboard.py b/src/pytorch_lightning/loggers/tensorboard.py index 75fa38d62da62e..470bf033e6a136 100644 --- a/src/pytorch_lightning/loggers/tensorboard.py +++ b/src/pytorch_lightning/loggers/tensorboard.py @@ -43,6 +43,8 @@ _TENSORBOARD_AVAILABLE = RequirementCache("tensorboard>=2.9.1") if TYPE_CHECKING and _TENSORBOARD_AVAILABLE: from torch.utils.tensorboard import SummaryWriter +else: + SummaryWriter = Any class TensorBoardLogger(Logger):