class_docstr: A recommender uses a surrogate to recommend models and their configurations
  based on desired target metrics.
  
  This class implements the general interface.
docstr: Fits the recommender, including surrogate model and generator, on the
  provided configurations.
  
  Args:
      configs: The configurations to train on (the generator typically extracts the unique
          model configurations).
      performances: The performances that the surrogate should fit on. The performances must
          align with the provided configurations.
docstr_tok: ["Fits","the","recommender",",","including","surrogate","model","and","generator",",","on","the","provided","configurations",".","Args",":","configs",":","The","configurations","to","train","on","(","the","generator","typically","extracts","the","unique","model","configurations",")",".","performances",":","The","performances","that","the","surrogate","should","fit","on",".","The","performances","must","align","with","the","provided","configurations","."]
code: def fit(
      self, configs: List[Config[T]], _performances: List[Performance]
  ) -> None:
      """
      Fits the recommender, including surrogate model and generator, on the
      provided configurations.
  
      Args:
          configs: The configurations to train on (the generator typically extracts the unique
              model configurations).
          performances: The performances that the surrogate should fit on. The performances must
              align with the provided configurations.
      """
      self.generator.fit(list({c.model for c in configs}))
  
file_path: gluonts/src/gluonts/nursery/tsbench/src/tsbench/recommender/_base.py
imports: from abc import ABC
  from typing import cast, Generic, List, Optional, TypeVar
  from tsbench.config import Config, DatasetConfig, EnsembleConfig, ModelConfig
  from tsbench.evaluations.metrics import Performance
  from ._recommendation import Recommendation
  from .generator import CandidateGenerator, ReplayCandidateGenerator
  from .utils import argsort_nondominated
label_desc: Use image node_id 4 for calling the Recommender obj's underlying member method code with example usage: obj.fit(configs, _performances) without return types