Pytorch Lightning Tensorboard logger automatically adds "epoch" scalar
As in: How do you prevent the tensorboard logger in pytorch lightning from logging the current epoch?
Pytorch Lightning Lightning Trainer with a LightningDataModule and LightningModule automatically logs a scalar with name &quot;epoch&quot; showing the number of epochs even if never told to do so.
How do I remove/ control that behavior?

In Short
You can disable automatically writing epoch variable by overwriting tensorboard logger.
from pytorch_lightning import loggers
from pytorch_lightning.utilities import rank_zero_only

class TBLogger(loggers.TensorBoardLogger):
    @rank_zero_only
    def log_metrics(self, metrics, step):
        metrics.pop('epoch', None)
        return super().log_metrics(metrics, step)

I already answer to question you mentioned. So if you want to see full long version, go to the question.
