Logging train metrics every N steps with TrainResult
What is your question?
Is there a way to log metrics at every N training steps? Currently, I returning a TrainResult object at the end of training_step with on_step=True (see code below). However, this setup is still logging data every 50 steps (see image)

Code
    def training_step(self, inputs, batch_idx):
        assert self.model.training, (
            f"{self._get_name()} model was changed to eval mode!"
        )
        data_time = torch.tensor(
            self.trainer.profiler.recorded_durations["get_train_batch"][-1]
        )

        outputs = self.model(inputs)
        metrics_dict = self._compute_train_metrics(inputs, outputs)
        metrics_dict["data_time"] = data_time
        metrics_dict["train_loss"] = metrics_dict["loss"].clone()

        result = TrainResult(minimize=metrics_dict.pop("loss"))
        result.log_dict(
            metrics_dict,
            on_step=True, 
            on_epoch=False,
            prog_bar=False,
            logger=True,
            sync_dist=False,  # don't sync metrics during training
        )
        return result
What have you tried?

Specifying trainer's log_save_interval (e.g. Trainer(log_save_interval=20))

What's your environment?

OS: Linux
Packaging: conda
Version: 0.9