class_docstr: PyTorch Lightning module for the meta models.
class_docstr_tok: ["PyTorch","Lightning","module","for","the","meta","models","."]
code: def training_step(
      self, batch: TripletBatch, *args: Any
  ) -> torch.Tensor:
      y_true = batch.query_future.sequences
      mask = get_mask(y_true.size()[1], batch.query_future.lengths)
      y_pred = self.model(batch.support_set, batch.query_past)
      loss = self.train_loss(y_pred, y_true, mask)
      self.log("train_loss", self.train_loss)
      return loss
  
file_path: gluonts/src/gluonts/nursery/few_shot_prediction/src/meta/models/module.py
imports: from typing import Any, Dict, Optional, List
  import pytorch_lightning
  import torch
  import torch.optim
  from torch import nn
  from torchmetrics import Metric
  from torch.optim.lr_scheduler import ReduceLROnPlateau
  from meta.data.batch import TripletBatch
  from meta.models.model import MetaModel
  from meta.common.torch import get_mask
label_desc: Use image node_id 3 for calling the MetaLightningModule obj's underlying member method code with example usage: obj.training_step(batch) and returns: loss