question: How to print metric value every epoch ?
context: What I want it to look like:
  
  What I got now:
  
  I think I do have logged metrics, how to make it printed beautifully ?
  class SortNumberModel(pl.LightningModule):
      def __init__(self, hf_config, lr):
          super().__init__()
          self.save_hyperparameters()
          self.model = AutoModelForTokenClassification.from_config(hf_config)
          self.val_acc = pl.metrics.Accuracy()
  
      def forward(self, batch):
          result = self.model(input_ids=batch["x"], labels=batch["y"], return_dict=True)
          return result.logits.argmax(dim=-1), result.loss
  
      def training_step(self, batch, batch_idx):
          return self.forward(batch)[-1]
  
      def validation_step(self, batch, batch_idx):
          preds, loss = self.forward(batch)
          self.val_acc(preds.view(-1), batch["y"].view(-1))
          self.log("valid_acc", self.val_acc, on_epoch=True)
  
      def configure_optimizers(self):
          return torch.optim.AdamW(self.parameters(), lr=self.hparams.lr, eps=1e-5)
answer: In pytorch-lightning bolts we have a few extra callbacks, with one of them being the PrintTableMetricsCallback callback that should output exactly what you want. Simply install bolts as
  pip install pytorch-lightning-bolts
  and initialize your trainer as:
  trainer = Trainer(callbacks=[PrintTableMetricsCallback()])