code: def load_data(
      self,
      data: DataFrame,
      time_idx: Optional[str] = None,
      target: Optional[Union[str, List[str]]] = None,
      group_ids: Optional[List[str]] = None,
      parameters: Optional[Dict[str, Any]] = None,
      **time_series_dataset_kwargs: Any,
  ):
      if self.training:
          time_series_dataset = TimeSeriesDataSet(
              data,
              time_idx=time_idx,
              group_ids=group_ids,
              target=target,
              **time_series_dataset_kwargs,
          )
          parameters = time_series_dataset.get_parameters()
  
          # Add some sample data so that we can recreate the `TimeSeriesDataSet` later on
          parameters["data_sample"] = data.iloc[[0]].to_dict()
  
          self.parameters = parameters
      else:
          if parameters is None:
              raise ValueError(
                  "Loading data for evaluation or inference requires parameters from the train data. Either "
                  "construct the train data at the same time as evaluation and inference or provide the train "
                  "`datamodule.parameters` to `from_data_frame` in the `parameters` argument."
              )
          parameters = copy(parameters)
          parameters.pop("data_sample")
          time_series_dataset = TimeSeriesDataSet.from_parameters(
              parameters,
              data,
              stop_randomization=True,
          )
      return time_series_dataset
  
file_path: lightning-flash/src/flash/tabular/forecasting/input.py
imports: from copy import copy
  from typing import Any, Dict, List, Optional, Tuple, Union
  from flash.core.data.io.input import DataKeys, Input
  from flash.core.utilities.imports import _FORECASTING_AVAILABLE, _PANDAS_AVAILABLE, requires
label_desc: Use image node_id 1 for calling the TabularForecastingDataFrameInput obj's underlying member method code with example usage: obj.load_data(data, time_idx, target, group_ids, parameters) and returns: time_series_dataset