docstr: Publishes the current metrics to wandb and tensorboard
  Arguments:
      step: current epoch
docstr_tok: ["Publishes","the","current","metrics","to","wandb","and","tensorboard","Arguments",":","step",":","current","epoch"]
code: def publish(self, epoch):
      """Publishes the current metrics to wandb and tensorboard
      Arguments:
          step: current epoch
      """
      metrics = self.get_metrics()
  
      if self._wandb:
          self.publish_to_wandb(metrics, epoch)
  
      if self._use_tensorboard:
          self.publish_to_tensorboard(metrics, epoch)
  
      return {
          "stage": self._stage,
          "epoch": epoch,
          "current_metrics": self._remove_stage_from_metric_keys(
              self._stage, metrics
          ),
      }
  
imports: import os
  import torchnet
  import torch
  from typing import Dict, Any
  import wandb
  from torch.utils.tensorboard import SummaryWriter
  import logging
  from torch_points3d.models import model_interface
label_desc: Use image node_id 12 for calling the BaseTracker obj's underlying member method code with example usage: obj.publish(epoch) and returns: dict