4/06/2022

pytorch lightning change checkpoints output dir and version str

 


Use "save_dir",  "name",  "version" params in pl_loggers function.

more detail : https://pytorch-lightning.readthedocs.io/en/stable/extensions/generated/pytorch_lightning.loggers.TensorBoardLogger.html

..

from pytorch_lightning import loggers as pl_loggers
tb_logger = pl_loggers.TensorBoardLogger(save_dir="logs", name='no_default', version='my_version_2')

trainer = Trainer(max_epochs=num_epochs, callbacks=[checkpoint_callback], logger=tb_logger)

..



And you can retrieve what is my logging path by:

tb_logger.log_dir or self.logger.log_dir (in class)

> logs/no_default/my_version_2


Thank you.

www.marearts.com

๐Ÿ™‡๐Ÿป‍♂️

No comments:

Post a Comment