class_docstr: Ensemble consisting of a single model.
  
  This class is used by the :class:`MultiObjectiveDummyEnsemble` to represent
  ensembles consisting of a single model, and this class should not be used
  on its own.
  
  Do not use by yourself!
  
  Parameters
  ----------
  task_type: int
      An identifier indicating which task is being performed.
  
  metrics: Sequence[Scorer] | Scorer
      The metrics used to evaluate the models.
  
  backend : Backend
      Gives access to the backend of Auto-sklearn. Not used.
  
  model_index : int
      Index of the model that constitutes the ensemble. This index will
      be used to select the correct predictions that will be passed during
      ``fit`` and ``predict``.
  
  random_state: int | RandomState | None = None
      Not used.
class_docstr_tok: ["Ensemble","consisting","of","a","single","model",".","This","class","is","used","by","the",":","class",":","`","MultiObjectiveDummyEnsemble","`","to","represent","ensembles","consisting","of","a","single","model",",","and","this","class","should","not","be","used","on","its","own",".","Do","not","use","by","yourself","!","Parameters","--","--","--","--","--","task_type",":","int","An","identifier","indicating","which","task","is","being","performed",".","metrics",":","Sequence","[","Scorer","]","|","Scorer","The","metrics","used","to","evaluate","the","models",".","backend",":","Backend","Gives","access","to","the","backend","of","Auto-sklearn",".","Not","used",".","model_index",":","int","Index","of","the","model","that","constitutes","the","ensemble",".","This","index","will","be","used","to","select","the","correct","predictions","that","will","be","passed","during","``","fit","``","and","``","predict","``",".","random_state",":","int","|","RandomState","|","None","=","None","Not","used","."]
docstr: Dummy implementation of the ``fit`` method.
  
  Actualy work of passing the model index is done in the constructor. This
  method only stores the identifier of the selected model and computes it's
  validation loss.
  
  Parameters
  ----------
  base_models_predictions: np.ndarray
      shape = (n_base_models, n_data_points, n_targets)
      n_targets is the number of classes in case of classification,
      n_targets is 0 or 1 in case of regression
  
      Can be a list of 2d numpy arrays as well to prevent copying all
      predictions into a single, large numpy array.
  
  true_targets : array of shape [n_targets]
  
  model_identifiers : identifier for each base model.
      Can be used for practical text output of the ensemble.
  
  runs: Sequence[Run]
      Additional information for each run executed by SMAC that was
      considered by the ensemble builder. Not used.
  
  X_data : list-like | spmatrix | None = None
     X data to feed to a metric if it requires it
  
  Returns
  -------
  self
docstr_tok: ["Dummy","implementation","of","the","``","fit","``","method",".","Actualy","work","of","passing","the","model","index","is","done","in","the","constructor",".","This","method","only","stores","the","identifier","of","the","selected","model","and","computes","it's","validation","loss",".","Parameters","--","--","--","--","--","base_models_predictions",":","np.ndarray","shape","=","(","n_base_models",",","n_data_points",",","n_targets",")","n_targets","is","the","number","of","classes","in","case","of","classification",",","n_targets","is","0","or","1","in","case","of","regression","Can","be","a","list","of","2d","numpy","arrays","as","well","to","prevent","copying","all","predictions","into","a","single",",","large","numpy","array",".","true_targets",":","array","of","shape","[","n_targets","]","model_identifiers",":","identifier","for","each","base","model",".","Can","be","used","for","practical","text","output","of","the","ensemble",".","runs",":","Sequence","[","Run","]","Additional","information","for","each","run","executed","by","SMAC","that","was","considered","by","the","ensemble","builder",".","Not","used",".","X_data",":","list-like","|","spmatrix","|","None","=","None","X","data","to","feed","to","a","metric","if","it","requires","it","Returns","--","--","--","-","self"]
code: def fit(
      self,
      base_models_predictions: np.ndarray | list[np.ndarray],
      true_targets: np.ndarray,
      model_identifiers: list[tuple[int, int, float]],
      runs: Sequence[Run],
      X_data: SUPPORTED_FEAT_TYPES | None = None,
  ) -> SingleModelEnsemble:
      """Dummy implementation of the ``fit`` method.
  
      Actualy work of passing the model index is done in the constructor. This
      method only stores the identifier of the selected model and computes it's
      validation loss.
  
      Parameters
      ----------
      base_models_predictions: np.ndarray
          shape = (n_base_models, n_data_points, n_targets)
          n_targets is the number of classes in case of classification,
          n_targets is 0 or 1 in case of regression
  
          Can be a list of 2d numpy arrays as well to prevent copying all
          predictions into a single, large numpy array.
  
      true_targets : array of shape [n_targets]
  
      model_identifiers : identifier for each base model.
          Can be used for practical text output of the ensemble.
  
      runs: Sequence[Run]
          Additional information for each run executed by SMAC that was
          considered by the ensemble builder. Not used.
  
      X_data : list-like | spmatrix | None = None
         X data to feed to a metric if it requires it
  
      Returns
      -------
      self
      """
      self.identifiers_ = [model_identifiers[self.indices_[0]]]
      loss = calculate_losses(
          solution=true_targets,
          prediction=base_models_predictions[self.indices_[0]],
          task_type=self.task_type,
          metrics=self.metrics,
          X_data=X_data,
      )
      self.best_model_score_ = loss[self.metrics[0].name]
      return self
  
imports: from __future__ import annotations
  from typing import Sequence
  import os
  import numpy
  from smac.runhistory.runhistory import RunHistory
  from autosklearn.automl_common.common.utils.backend import Backend
  from autosklearn.data.validation import SUPPORTED_FEAT_TYPES
  from autosklearn.ensemble_building.run import Run
  from autosklearn.ensembles.abstract_ensemble import AbstractEnsemble
  from autosklearn.metrics import Scorer, calculate_losses
  from autosklearn.pipeline.base import BasePipeline
label_desc: Use image node_id 2 for calling the SingleModelEnsemble obj's underlying member method code with example usage: obj.fit(base_models_predictions, true_targets, model_identifiers, runs, X_data) and returns: self