class_docstr: The DeepSet surrogate is similar to the MLP surrogate but makes predictions
  for ensembles rather than single models.
  
  Currently, it does not support the use of dataset features.
docstr: Args:
      tracker: A tracker that can be used to impute latency and number of model parameters
          into model performances. Also, it is required for some input features.
      objective: The optimization objective for the XGBoost estimators.
      discount: The discount to apply for the ranking loss. If provided, it focuses on
          correctly predicting the top values.
      hidden_layer_sizes: The dimensions of the hidden layers. Defaults to two hidden layers
          of size 32.
      weight_decay: The weight decay to apply during optimization.
      dropout: The dropout probability of dropout layers applied after every activation
          function.
      predict: The metrics to predict. All if not provided.
      output_normalization: The type of normalization to apply to the features of each
          dataset independently. `None` applies no normalization, "quantile" applies quantile
          normalization, and "standard" transforms data to have zero mean and unit variance.
      impute_simulatable: Whether the tracker should impute latency and number of model
          parameters into the returned performance object.
docstr_tok: ["Args",":","tracker",":","A","tracker","that","can","be","used","to","impute","latency","and","number","of","model","parameters","into","model","performances",".","Also",",","it","is","required","for","some","input","features",".","objective",":","The","optimization","objective","for","the","XGBoost","estimators",".","discount",":","The","discount","to","apply","for","the","ranking","loss",".","If","provided",",","it","focuses","on","correctly","predicting","the","top","values",".","hidden_layer_sizes",":","The","dimensions","of","the","hidden","layers",".","Defaults","to","two","hidden","layers","of","size","32.","weight_decay",":","The","weight","decay","to","apply","during","optimization",".","dropout",":","The","dropout","probability","of","dropout","layers","applied","after","every","activation","function",".","predict",":","The","metrics","to","predict",".","All","if","not","provided",".","output_normalization",":","The","type","of","normalization","to","apply","to","the","features","of","each","dataset","independently",".","`","None","`","applies","no","normalization",",","``","quantile","''","applies","quantile","normalization",",","and","``","standard","''","transforms","data","to","have","zero","mean","and","unit","variance",".","impute_simulatable",":","Whether","the","tracker","should","impute","latency","and","number","of","model","parameters","into","the","returned","performance","object","."]
code: def __init__(
      self,
      tracker: EnsembleTracker,
      objective: Literal["regression", "ranking"] = "ranking",
      discount: Optional[
          Literal["logarithmic", "linear", "quadratic"]
      ] = "linear",
      hidden_layer_sizes: Optional[List[int]] = None,
      weight_decay: float = 0.01,
      dropout: float = 0.0,
      predict: Optional[List[str]] = None,
      output_normalization: OutputNormalization = None,
      impute_simulatable: bool = False,
  ):
      """
      Args:
          tracker: A tracker that can be used to impute latency and number of model parameters
              into model performances. Also, it is required for some input features.
          objective: The optimization objective for the XGBoost estimators.
          discount: The discount to apply for the ranking loss. If provided, it focuses on
              correctly predicting the top values.
          hidden_layer_sizes: The dimensions of the hidden layers. Defaults to two hidden layers
              of size 32.
          weight_decay: The weight decay to apply during optimization.
          dropout: The dropout probability of dropout layers applied after every activation
              function.
          predict: The metrics to predict. All if not provided.
          output_normalization: The type of normalization to apply to the features of each
              dataset independently. `None` applies no normalization, "quantile" applies quantile
              normalization, and "standard" transforms data to have zero mean and unit variance.
          impute_simulatable: Whether the tracker should impute latency and number of model
              parameters into the returned performance object.
      """
  
      super().__init__(
          tracker, predict, output_normalization, impute_simulatable
      )
  
      self.use_ranking = objective == "ranking"
      self.hidden_layer_sizes = hidden_layer_sizes or [32, 32]
      self.weight_decay = weight_decay
      self.dropout = dropout
  
      self.config_transformer = EnsembleConfigTransformer()
  
      if objective == "regression":
          self.loss = nn.MSELoss()
      elif objective == "ranking":
          self.loss = ListMLELoss(discount=discount)
  
imports: from typing import cast, List, Literal, Optional
  import numpy
  import numpy.typing
  import pytorch_lightning
  import torch
  from lightkit.data import DataLoader
  from torch import nn
  from torch.utils.data import TensorDataset
  from tsbench.config import Config, EnsembleConfig
  from tsbench.evaluations.tracking import EnsembleTracker
  from tsbench.surrogate.torch.deepset import DeepSetModel
  from ._base import OutputNormalization, Surrogate
  from ._factory import register_ensemble_surrogate
  from .torch import DeepSetLightningModule, ListMLELoss
  from .transformers import EnsembleConfigTransformer
label_desc: Use image node_id 1 to create a new DeepSetSurrogate object from inherited base classes: Surrogate with example: obj = DeepSetSurrogate(tracker, objective, discount, hidden_layer_sizes, weight_decay, dropout, predict, output_normalization, impute_simulatable)