LoggerCollection breaks PyTorch profiler #8157
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Open to be worked on
priority: 0
High priority task
Milestone
🐛 Bug
If the Trainer's
profiler
parameter is set to"pytorch"
and theTrainer
's logger is an instance ofLoggerCollection
, the profiler fails to write to a local file (with a warning).The path for said file is derived from this property of the Trainer, which in turn derives from the
save_dir
of the Trainer's logger whenever the logger isn't a stock TensorBoard logger. Thesave_dir
property of a LoggerCollection, which is what you get when the trainer is provided with more than one logger, is set to None by default, apparently deliberately. I'm not sure what the rationale behind that decision was, so I'm hesitant to make a PR myself, but it seems logical to me thatLoggerCollection
should have alog_path
property defined analogously to that of aTensorBoardLogger
, and that the property of theTrainer
shouldn't fall back to thesave_dir
property automatically when its logger isn't an instance ofTensorBoardLogger
.Reproduction
Here's a BoringModel Colab link. The following warning is generated during training when the
Trainer
's logger is wrapped in a list:Expected behavior
The PyTorch profiler should always have access to a default logging path, even when the
Trainer
's logger is aLoggerCollection
. Ideally, it would follow the same "version" convention obeyed when the logger is aTensorBoardLogger
.Environment
The text was updated successfully, but these errors were encountered: