Pytorch Lightning ThroughputMonitor

Greeting all,

I have this PytorchLightning code, I want to add ThroughputMonitor but I couldn’t find how.
Can you advise how to add it?

Note that it’s MultiNode CPU training.
I will convert it to MutliNode GPU but first I am testing with CPI


def main():
    model = CIFAR10Model()

    logger = TensorBoardLogger("logs/tb_logs", name="resnet18_ciphar10_lightning")

    profiler = PyTorchProfiler(dirpath="logs/profiler_logs", filename="perf-logs")

    trainer = Trainer(
        max_epochs=args.epochs,
        accelerator="cpu",
        devices=16,
        strategy="ddp",
        logger=logger,
        enable_progress_bar=True,
        profiler=profiler,
        num_nodes=3,
        log_every_n_steps=1,
        callbacks=[DeviceStatsMonitor(), EarlyStopping(...)]
    )