class_docstr: A callback that computes additional metrics on a numpy representation of the dataset every n epochs.
  The computed values are logged to the output file of the pytorch lightning logger.
  
  Args:
      quantiles: The quantiles that are predicted.
      split: Specifies the split the batch comes from (i.e. from training or validation split)
      every_n_epochs: Specifies how often the plots are generated.
          Setting this to a large value can save time since plotting can be time consuming
          (especially when small datasets are used).
class_docstr_tok: ["A","callback","that","computes","additional","metrics","on","a","numpy","representation","of","the","dataset","every","n","epochs",".","The","computed","values","are","logged","to","the","output","file","of","the","pytorch","lightning","logger",".","Args",":","quantiles",":","The","quantiles","that","are","predicted",".","split",":","Specifies","the","split","the","batch","comes","from","(","i.e",".","from","training","or","validation","split",")","every_n_epochs",":","Specifies","how","often","the","plots","are","generated",".","Setting","this","to","a","large","value","can","save","time","since","plotting","can","be","time","consuming","(","especially","when","small","datasets","are","used",")","."]
code: def __init__(
      self,
      quantiles: List[str],
      split: Optional[Union["train", "val"]] = None,
      every_n_epochs: int = 1,
  ):
      super().__init__()
      self.quantiles = quantiles
      self.split = split
      self.every_n_epochs = every_n_epochs
  
file_path: gluonts/src/gluonts/nursery/few_shot_prediction/src/meta/callbacks/metric.py
imports: from typing import Optional, Union, List
  from pytorch_lightning import Callback, Trainer
  import torch
  from gluonts.time_feature import get_seasonality
  from meta.models.module import MetaLightningModule
  from meta.common.torch import tensor_to_np
  from meta.metrics.numpy import compute_metrics
label_desc: Use image node_id 1 to create a new QuantileMetricLoggerCallback object from inherited base classes: Callback with example: obj = QuantileMetricLoggerCallback(quantiles, split, every_n_epochs)