class_docstr: An estimator training the TiDE model form the paper
  https://arxiv.org/abs/2304.08424 extended for probabilistic forecasting.
  
  This class is uses the model defined in ``TiDEModel``,
  and wraps it into a ``TiDELightningModule`` for training
  purposes: training is performed using PyTorch Lightning's ``pl.Trainer``
  class.
  
  Parameters
  ----------
  freq
      Frequency of the data to train on and predict.
  prediction_length
      Length of the prediction horizon.
  context_length
      Number of time steps prior to prediction time that the model
      takes as inputs (default: ``prediction_length``).
  feat_proj_hidden_dim
      Size of the feature projection layer (default: 4).
  encoder_hidden_dim
      Size of the dense encoder layer (default: 4).
  decoder_hidden_dim
      Size of the dense decoder layer (default: 4).
  temporal_hidden_dim
      Size of the temporal decoder layer (default: 4).
  distr_hidden_dim
      Size of the distribution projection layer (default: 4).
  num_layers_encoder
      Number of layers in dense encoder (default: 1).
  num_layers_decoder
      Number of layers in dense decoder (default: 1).
  decoder_output_dim
      Output size of dense decoder (default: 4).
  dropout_rate
      Dropout regularization parameter (default: 0.3).
  num_feat_dynamic_proj
      Output size of feature projection layer (default: 2).
  num_feat_dynamic_real
      Number of dynamic real features in the data (default: 0).
  num_feat_static_real
      Number of static real features in the data (default: 0).
  num_feat_static_cat
      Number of static categorical features in the data (default: 0).
  cardinality
      Number of values of each categorical feature.
      This must be set if ``num_feat_static_cat > 0`` (default: None).
  embedding_dimension
      Dimension of the embeddings for categorical features
      (default: ``[16 for cat in cardinality]``).
  layer_norm
      Enable layer normalization or not (default: False).
  lr
      Learning rate (default: ``1e-3``).
  weight_decay
      Weight decay regularization parameter (default: ``1e-8``).
  patience
      Patience parameter for learning rate scheduler (default: 10).
  distr_output
      Distribution to use to evaluate observations and sample predictions
      (default: StudentTOutput()).
  scaling
      Which scaling method to use to scale the target values (default: mean).
  batch_size
      The size of the batches to be used for training (default: 32).
  num_batches_per_epoch
      Number of batches to be processed in each training epoch
      (default: 50).
  trainer_kwargs
      Additional arguments to provide to ``pl.Trainer`` for construction.
  train_sampler
      Controls the sampling of windows during training.
  validation_sampler
      Controls the sampling of windows during validation.
class_docstr_tok: ["An","estimator","training","the","TiDE","model","form","the","paper","https",":","\/\/arxiv.org\/abs\/2304.08424","extended","for","probabilistic","forecasting",".","This","class","is","uses","the","model","defined","in","``","TiDEModel","``",",","and","wraps","it","into","a","``","TiDELightningModule","``","for","training","purposes",":","training","is","performed","using","PyTorch","Lightning","'s","``","pl.Trainer","``","class",".","Parameters","--","--","--","--","--","freq","Frequency","of","the","data","to","train","on","and","predict",".","prediction_length","Length","of","the","prediction","horizon",".","context_length","Number","of","time","steps","prior","to","prediction","time","that","the","model","takes","as","inputs","(","default",":","``","prediction_length","``",")",".","feat_proj_hidden_dim","Size","of","the","feature","projection","layer","(","default",":","4",")",".","encoder_hidden_dim","Size","of","the","dense","encoder","layer","(","default",":","4",")",".","decoder_hidden_dim","Size","of","the","dense","decoder","layer","(","default",":","4",")",".","temporal_hidden_dim","Size","of","the","temporal","decoder","layer","(","default",":","4",")",".","distr_hidden_dim","Size","of","the","distribution","projection","layer","(","default",":","4",")",".","num_layers_encoder","Number","of","layers","in","dense","encoder","(","default",":","1",")",".","num_layers_decoder","Number","of","layers","in","dense","decoder","(","default",":","1",")",".","decoder_output_dim","Output","size","of","dense","decoder","(","default",":","4",")",".","dropout_rate","Dropout","regularization","parameter","(","default",":","0.3",")",".","num_feat_dynamic_proj","Output","size","of","feature","projection","layer","(","default",":","2",")",".","num_feat_dynamic_real","Number","of","dynamic","real","features","in","the","data","(","default",":","0",")",".","num_feat_static_real","Number","of","static","real","features","in","the","data","(","default",":","0",")",".","num_feat_static_cat","Number","of","static","categorical","features","in","the","data","(","default",":","0",")",".","cardinality","Number","of","values","of","each","categorical","feature",".","This","must","be","set","if","``","num_feat_static_cat",">","0","``","(","default",":","None",")",".","embedding_dimension","Dimension","of","the","embeddings","for","categorical","features","(","default",":","``","[","16","for","cat","in","cardinality","]","``",")",".","layer_norm","Enable","layer","normalization","or","not","(","default",":","False",")",".","lr","Learning","rate","(","default",":","``","1e-3","``",")",".","weight_decay","Weight","decay","regularization","parameter","(","default",":","``","1e-8","``",")",".","patience","Patience","parameter","for","learning","rate","scheduler","(","default",":","10",")",".","distr_output","Distribution","to","use","to","evaluate","observations","and","sample","predictions","(","default",":","StudentTOutput","(",")",")",".","scaling","Which","scaling","method","to","use","to","scale","the","target","values","(","default",":","mean",")",".","batch_size","The","size","of","the","batches","to","be","used","for","training","(","default",":","32",")",".","num_batches_per_epoch","Number","of","batches","to","be","processed","in","each","training","epoch","(","default",":","50",")",".","trainer_kwargs","Additional","arguments","to","provide","to","``","pl.Trainer","``","for","construction",".","train_sampler","Controls","the","sampling","of","windows","during","training",".","validation_sampler","Controls","the","sampling","of","windows","during","validation","."]
code: def create_lightning_module(self) -> pl.LightningModule:
      return TiDELightningModule(
          lr=self.lr,
          weight_decay=self.weight_decay,
          patience=self.patience,
          model_kwargs={
              "context_length": self.context_length,
              "prediction_length": self.prediction_length,
              "num_feat_dynamic_real": 7 + self.num_feat_dynamic_real,
              "num_feat_dynamic_proj": self.num_feat_dynamic_proj,
              "num_feat_static_real": max(1, self.num_feat_static_real),
              "num_feat_static_cat": max(1, self.num_feat_static_cat),
              "cardinality": self.cardinality,
              "embedding_dimension": self.embedding_dimension,
              "feat_proj_hidden_dim": self.feat_proj_hidden_dim,
              "encoder_hidden_dim": self.encoder_hidden_dim,
              "decoder_hidden_dim": self.decoder_hidden_dim,
              "temporal_hidden_dim": self.temporal_hidden_dim,
              "distr_hidden_dim": self.distr_hidden_dim,
              "decoder_output_dim": self.decoder_output_dim,
              "dropout_rate": self.dropout_rate,
              "num_layers_encoder": self.num_layers_encoder,
              "num_layers_decoder": self.num_layers_decoder,
              "layer_norm": self.layer_norm,
              "distr_output": self.distr_output,
              "scaling": self.scaling,
          },
      )
  
imports: from typing import Optional, Iterable, Dict, Any, List
  import torch
  import lightning.pytorch
  from gluonts.core.component import validated
  from gluonts.dataset.common import Dataset
  from gluonts.dataset.field_names import FieldName
  from gluonts.dataset.loader import as_stacked_batches
  from gluonts.itertools import Cyclic
  from gluonts.model.forecast_generator import DistributionForecastGenerator
  from gluonts.time_feature import minute_of_hour, hour_of_day, day_of_month, day_of_week, day_of_year, month_of_year, week_of_year
  from gluonts.transform import Transformation, Chain, RemoveFields, SetField, AsNumpyArray, AddObservedValuesIndicator, AddTimeFeatures, VstackFeatures, InstanceSplitter, ValidationSplitSampler, TestSplitSampler, ExpectedNumInstanceSampler, InstanceSampler
  from gluonts.torch.model.estimator import PyTorchLightningEstimator
  from gluonts.torch.model.predictor import PyTorchPredictor
  from gluonts.torch.distributions import DistributionOutput, StudentTOutput
  from .lightning_module import TiDELightningModule
label_desc: Use image node_id 3 for calling the TiDEEstimator obj's underlying member method code with example usage: obj.create_lightning_module() and returns: TiDELightningModule