stared / livelossplot

Live training loss plot in Jupyter Notebook for Keras, PyTorch and others
https://p.migdal.pl/livelossplot
MIT License
1.29k stars 142 forks source link

Cannot log to Tensorboard because of automatic folder name #75

Closed PhilMacKay closed 4 years ago

PhilMacKay commented 4 years ago

When using Tensorboard logging, it will try to create a directory with time_str = datetime.now().isoformat()[:-7].replace("T", " "). However, the isoformat includes the ":" character which cannot be used in a file path.

The line should be updated to replace a blacklist of characters. This may vary from one OS to another, but on Windows 10, it's not possible to use Tensorboard logging without tweaking the time_str variable.

stared commented 4 years ago

@PhilMacKay Thank you for bringing this issue (I tested it on macOS and Ubuntu, but not Windows).

Yes, it is likely system dependent. If you create a PR solving that issue (e.g. .replace(":", "_")), I will gladly accept that.

stared commented 4 years ago

Solved with #77.