-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
🐛 Bug
Moving lightning_logs to another filesystem and symlinking it so I don't need to touch my code, I notice that the logger rejects symlinked logger folders:
loggers/csv_logs.py if not os.path.isdir(root_dir):
Users will expect symlinks to folders to work the same way as folders.
To Reproduce
mkdir /tmp/lightning_logs
ln -s /tmp/lightning_logs/
and try training as usual.
Expected behavior
The symlinked folder is accepted and, in the above example, the logs start filling /tmp instead of $HOME.
Workarounds
(Breaking existing paths)
Solution 1: Create a folder inside the symlinked folder and set save_dir to this subfolder (not tested)
Solution 2: Use the absolute path to the folder, e.g. trainer = pl.Trainer(logger = pl.loggers.TensorBoardLogger(os.path.abspath('lightning_logs'))) (I was expecting the next run to go to version_3 after I had versions 0, 1 and 2 but it went to default/version_0 so there still seems to be a side effect)
Environment
Private, local Jupyter notebook with manually setup virtualenv.
- PyTorch Version (e.g., 1.0): 1.7.1+cu101
- OS (e.g., Linux): Linux
- How you installed PyTorch (
conda,pip, source): pip - Build command you used (if compiling from source):
- Python version: 3.6.12
- CUDA/cuDNN version: 10.1
- GPU models and configuration: GeForce GTX Titan-X
- Any other relevant information: None
Additional context
None