docstr: Super-class for all training datasets for torch models in Darts. These include
  
  * "PastCovariates" datasets (for PastCovariatesTorchModel): containing (past_target,
                                                                          past_covariates,
                                                                          static_covariates,
                                                                          future_target)
  * "FutureCovariates" datasets (for FutureCovariatesTorchModel): containing (past_target,
                                                                              future_covariates,
                                                                              static_covariates,
                                                                              future_target)
  * "DualCovariates" datasets (for DualCovariatesTorchModel): containing (past_target,
                                                                          historic_future_covariates,
                                                                          future_covariates,
                                                                          static_covariates,
                                                                          future_target)
  * "MixedCovariates" datasets (for MixedCovariatesTorchModel): containing (past_target,
                                                                            past_covariates,
                                                                            historic_future_covariates,
                                                                            future_covariates,
                                                                            static_covariates,
                                                                            future_target)
  * "SplitCovariates" datasets (for SplitCovariatesTorchModel): containing (past_target,
                                                                            past_covariates,
                                                                            future_covariates,
                                                                            static_covariates,
                                                                            future_target)
  
  The covariates are optional and can be `None`.
  
  This is meant to be used for training (or validation), all data except `future_target` represents model
  inputs (`future_target` is the output the model are trained to predict).
  
  Darts `TorchForecastingModel`s can be fit from instances of `TrainingDataset` of the right type using the
  `fit_from_dataset()` method.
  
  `TrainingDataset` inherits torch `Dataset`; meaning that the implementations have to
  provide the `__getitem__()` method.
  
  It contains `np.ndarray` (and not `TimeSeries`), because training requires the values only,
  and so we can get big performance gains when slicing by returning only numpy views of the data
  underlying the `TimeSeries`.
code: def __init__(self):
      """
      Super-class for all training datasets for torch models in Darts. These include
  
      * "PastCovariates" datasets (for PastCovariatesTorchModel): containing (past_target,
                                                                              past_covariates,
                                                                              static_covariates,
                                                                              future_target)
      * "FutureCovariates" datasets (for FutureCovariatesTorchModel): containing (past_target,
                                                                                  future_covariates,
                                                                                  static_covariates,
                                                                                  future_target)
      * "DualCovariates" datasets (for DualCovariatesTorchModel): containing (past_target,
                                                                              historic_future_covariates,
                                                                              future_covariates,
                                                                              static_covariates,
                                                                              future_target)
      * "MixedCovariates" datasets (for MixedCovariatesTorchModel): containing (past_target,
                                                                                past_covariates,
                                                                                historic_future_covariates,
                                                                                future_covariates,
                                                                                static_covariates,
                                                                                future_target)
      * "SplitCovariates" datasets (for SplitCovariatesTorchModel): containing (past_target,
                                                                                past_covariates,
                                                                                future_covariates,
                                                                                static_covariates,
                                                                                future_target)
  
      The covariates are optional and can be `None`.
  
      This is meant to be used for training (or validation), all data except `future_target` represents model
      inputs (`future_target` is the output the model are trained to predict).
  
      Darts `TorchForecastingModel`s can be fit from instances of `TrainingDataset` of the right type using the
      `fit_from_dataset()` method.
  
      `TrainingDataset` inherits torch `Dataset`; meaning that the implementations have to
      provide the `__getitem__()` method.
  
      It contains `np.ndarray` (and not `TimeSeries`), because training requires the values only,
      and so we can get big performance gains when slicing by returning only numpy views of the data
      underlying the `TimeSeries`.
      """
  
      self._index_memory: Dict = {}
  
imports: from abc import ABC, abstractmethod
  from typing import Dict, Optional, Tuple
  import numpy
  from torch.utils.data import Dataset
  from darts import TimeSeries
  from darts.logging import get_logger, raise_if_not
  from .utils import CovariateType
label_desc: Use image node_id 1 to create a new TrainingDataset object from inherited base classes: ABC, Dataset with example: obj = TrainingDataset()