class_docstr: The optimal recommender makes recommendations by accessing the true
  performances of the models.
class_docstr_tok: ["The","optimal","recommender","makes","recommendations","by","accessing","the","true","performances","of","the","models","."]
docstr: Args:
      tracker: The tracker to obtain true performance metrics from.
      objectives: The list of performance metrics to minimize.
      focus: The metric to prefer. Must be either in the list of objectives. If not
          provided, the first metric to optimize is chosen.
      generator: The generator that generates configurations for recommendations. By default,
          this is the replay candidate generator.
docstr_tok: ["Args",":","tracker",":","The","tracker","to","obtain","true","performance","metrics","from",".","objectives",":","The","list","of","performance","metrics","to","minimize",".","focus",":","The","metric","to","prefer",".","Must","be","either","in","the","list","of","objectives",".","If","not","provided",",","the","first","metric","to","optimize","is","chosen",".","generator",":","The","generator","that","generates","configurations","for","recommendations",".","By","default",",","this","is","the","replay","candidate","generator","."]
code: def __init__(
      self,
      tracker: ModelTracker,
      objectives: List[str],
      focus: Optional[str] = None,
      generator: Optional[CandidateGenerator[ModelConfig]] = None,
  ):
      """
      Args:
          tracker: The tracker to obtain true performance metrics from.
          objectives: The list of performance metrics to minimize.
          focus: The metric to prefer. Must be either in the list of objectives. If not
              provided, the first metric to optimize is chosen.
          generator: The generator that generates configurations for recommendations. By default,
              this is the replay candidate generator.
      """
      super().__init__(objectives, focus, generator=generator)
      self.tracker = tracker
  
file_path: gluonts/src/gluonts/nursery/tsbench/src/tsbench/recommender/optimal.py
imports: from typing import List, Optional
  from tsbench.config import Config, ModelConfig
  from tsbench.evaluations.metrics import Performance
  from tsbench.evaluations.tracking import ModelTracker
  from ._base import Recommender
  from ._factory import register_recommender
  from .generator import CandidateGenerator
label_desc: Use image node_id 1 to create a new OptimalRecommender object from inherited base classes: Recommender with example: obj = OptimalRecommender(tracker, objectives, focus, generator)