docstr: Subclassed Neural mixer used for time series forecasting scenarios. 
  
  :param stop_after: How long the total fitting process should take
  :param target: Name of the target column
  :param dtype_dict: Data type dictionary
  :param timeseries_settings: TimeseriesSettings object for time-series tasks, refer to its documentation for available settings.
  :param target_encoder: Reference to the encoder used for the target
  :param net: The network type to use (`DeafultNet` or `ArNet`)
  :param fit_on_dev: If we should fit on the dev dataset
  :param search_hyperparameters: If the network should run a more through hyperparameter search (currently disabled)
  :param n_epochs: amount of epochs that the network will be trained for. Supersedes all other early stopping criteria if specified.
docstr_tok: ["Subclassed","Neural","mixer","used","for","time","series","forecasting","scenarios",".",":","param","stop_after",":","How","long","the","total","fitting","process","should","take",":","param","target",":","Name","of","the","target","column",":","param","dtype_dict",":","Data","type","dictionary",":","param","timeseries_settings",":","TimeseriesSettings","object","for","time-series","tasks",",","refer","to","its","documentation","for","available","settings",".",":","param","target_encoder",":","Reference","to","the","encoder","used","for","the","target",":","param","net",":","The","network","type","to","use","(","`","DeafultNet","`","or","`","ArNet","`",")",":","param","fit_on_dev",":","If","we","should","fit","on","the","dev","dataset",":","param","search_hyperparameters",":","If","the","network","should","run","a","more","through","hyperparameter","search","(","currently","disabled",")",":","param","n_epochs",":","amount","of","epochs","that","the","network","will","be","trained","for",".","Supersedes","all","other","early","stopping","criteria","if","specified","."]
code: def __init__(
      self,
      stop_after: float,
      target: str,
      dtype_dict: Dict[str, str],
      timeseries_settings: TimeseriesSettings,
      target_encoder: BaseEncoder,
      net: str,
      fit_on_dev: bool,
      search_hyperparameters: bool,
      ts_analysis: Dict[str, Dict],
      n_epochs: Optional[int] = None,
      use_stl: Optional[bool] = False,
  ):
      """
      Subclassed Neural mixer used for time series forecasting scenarios.
  
      :param stop_after: How long the total fitting process should take
      :param target: Name of the target column
      :param dtype_dict: Data type dictionary
      :param timeseries_settings: TimeseriesSettings object for time-series tasks, refer to its documentation for available settings.
      :param target_encoder: Reference to the encoder used for the target
      :param net: The network type to use (`DeafultNet` or `ArNet`)
      :param fit_on_dev: If we should fit on the dev dataset
      :param search_hyperparameters: If the network should run a more through hyperparameter search (currently disabled)
      :param n_epochs: amount of epochs that the network will be trained for. Supersedes all other early stopping criteria if specified.
      """  # noqa
      super().__init__(
          stop_after,
          target,
          dtype_dict,
          target_encoder,
          net,
          fit_on_dev,
          search_hyperparameters,
          n_epochs,
      )
      self.timeseries_settings = timeseries_settings
      assert self.timeseries_settings.is_timeseries
      self.ts_analysis = ts_analysis
      self.net_class = DefaultNet if net == "DefaultNet" else ArNet
      self.stable = True
      self.use_stl = use_stl
  
imports: import time
  from copy import deepcopy
  from typing import Dict, Optional, List
  import numpy
  import pandas
  import torch
  from torch import nn
  from torch.cuda.amp import GradScaler
  from torch.utils.data import DataLoader
  from type_infer.dtype import dtype
  from lightwood.api.types import PredictionArguments
  from lightwood.encoder.base import BaseEncoder
  from lightwood.data.encoded_ds import EncodedDs, ConcatedEncodedDs
  from lightwood.mixer.neural import Neural
  from lightwood.mixer.helpers.ar_net import ArNet
  from lightwood.mixer.helpers.default_net import DefaultNet
  from lightwood.api.types import TimeseriesSettings
label_desc: Use image node_id 1 to create a new NeuralTs object from inherited base classes: Neural with example: obj = NeuralTs(stop_after, target, dtype_dict, timeseries_settings, target_encoder, net, fit_on_dev, search_hyperparameters, ts_analysis, n_epochs, use_stl)