class_docstr: A ``pl.LightningModule`` class that can be used to train a
  ``LagTSTModel`` with PyTorch Lightning.
  
  This is a thin layer around a (wrapped) ``LagTSTModel`` object,
  that exposes the methods to evaluate training and validation loss.
  
  Parameters
  ----------
  model_kwargs
      Keyword arguments to construct the ``LagTSTModel`` to be trained.
  loss
      Loss function to be used for training.
  lr
      Learning rate.
  weight_decay
      Weight decay regularization parameter.
class_docstr_tok: ["A","``","pl.LightningModule","``","class","that","can","be","used","to","train","a","``","LagTSTModel","``","with","PyTorch","Lightning",".","This","is","a","thin","layer","around","a","(","wrapped",")","``","LagTSTModel","``","object",",","that","exposes","the","methods","to","evaluate","training","and","validation","loss",".","Parameters","--","--","--","--","--","model_kwargs","Keyword","arguments","to","construct","the","``","LagTSTModel","``","to","be","trained",".","loss","Loss","function","to","be","used","for","training",".","lr","Learning","rate",".","weight_decay","Weight","decay","regularization","parameter","."]
docstr: Execute validation step.
docstr_tok: ["Execute","validation","step","."]
code: def validation_step(self, batch, batch_idx: int):  # type: ignore
      """
      Execute validation step.
      """
      val_loss = self.model.loss(
          **select(self.inputs, batch),
          future_target=batch["future_target"],
          future_observed_values=batch["future_observed_values"],
      ).mean()
  
      self.log(
          "val_loss",
          val_loss,
          on_epoch=True,
          on_step=False,
          prog_bar=True,
      )
      return val_loss
  
file_path: gluonts/src/gluonts/torch/model/lag_tst/lightning_module.py
imports: import lightning.pytorch
  import torch
  from gluonts.core.component import validated
  from gluonts.itertools import select
  from .module import LagTSTModel
label_desc: Use image node_id 4 for calling the LagTSTLightningModule obj's underlying member method code with example usage: obj.validation_step(batch, batch_idx) and returns: val_loss