docstr: Fits a set of sktime forecasters. The number of models depends on how many groups are observed at training time.
  
  Forecaster type can be specified by providing the `model_class` argument in `__init__()`. It can also be determined by hyperparameter optimization based on dev data validation error.
docstr_tok: ["Fits","a","set","of","sktime","forecasters",".","The","number","of","models","depends","on","how","many","groups","are","observed","at","training","time",".","Forecaster","type","can","be","specified","by","providing","the","`","model_class","`","argument","in","`","__init__","(",")","`",".","It","can","also","be","determined","by","hyperparameter","optimization","based","on","dev","data","validation","error","."]
code: def fit(self, train_data: EncodedDs, dev_data: EncodedDs) -> None:
      """
      Fits a set of sktime forecasters. The number of models depends on how many groups are observed at training time.
  
      Forecaster type can be specified by providing the `model_class` argument in `__init__()`. It can also be determined by hyperparameter optimization based on dev data validation error.
      """  # noqa
      log.info(
          f"Started fitting {self.name} forecaster for array prediction"
      )
  
      if self.hyperparam_search:
          search_space = {"class": self.possible_models}
          self.study = optuna.create_study(
              direction="minimize",
              sampler=optuna.samplers.GridSampler(search_space),
          )
          self.study.optimize(
              lambda trial: self._get_best_model(
                  trial, train_data, dev_data
              ),
              n_trials=self.n_trials,
          )
          data = ConcatedEncodedDs([train_data, dev_data])
          self._fit(data)
  
      else:
          data = ConcatedEncodedDs([train_data, dev_data])
          self._fit(data)
  
imports: import importlib
  from copy import deepcopy
  from datetime import datetime
  from typing import Dict, Union, Optional
  import optuna
  import numpy
  import pandas
  from sktime.forecasting.compose import TransformedTargetForecaster
  from sktime.forecasting.base import ForecastingHorizon, BaseForecaster
  from sktime.performance_metrics.forecasting import MeanAbsolutePercentageError
  from sktime.forecasting.statsforecast import StatsForecastAutoARIMA
  from lightwood.helpers.log import log
  from lightwood.helpers.templating import _add_cls_kwarg
  from lightwood.mixer.base import BaseMixer
  from lightwood.api.types import PredictionArguments
  from lightwood.data.encoded_ds import EncodedDs, ConcatedEncodedDs
label_desc: Use image node_id 2 for calling the SkTime obj's underlying member method code with example usage: obj.fit(train_data, dev_data) without return types