class_docstr: Ex-Model CL Scenario.
  
  Ex-Model Continual Learning (ExML) is a continual learning scenario where
  the CL agent learns from a stream of pretrained models instead of raw data.
  These approach allows to integrate knowledge from different CL agents or
  pretrained models.
  
  Reference: Carta, A., Cossu, A., Lomonaco, V., & Bacciu, D. (2021).
  Ex-Model: Continual Learning from a Stream of Trained Models.
  arXiv preprint arXiv:2112.06511.
  https://arxiv.org/abs/2112.06511
docstr: Init.
  
  :param original_benchmark: a reference to the original benchmark
      containing the stream of experiences used to train the experts.
  :param expert_models: pretrained models. The model in position i must
      be trained on the i-th experience of the train stream of
      `original_benchmark`.
code: def __init__(
      self, original_benchmark: CLScenario, expert_models: List[Module]
  ):
      """Init.
  
      :param original_benchmark: a reference to the original benchmark
          containing the stream of experiences used to train the experts.
      :param expert_models: pretrained models. The model in position i must
          be trained on the i-th experience of the train stream of
          `original_benchmark`.
      """
      expert_models_l: List[TExModelExperience] = []
      for i, (m, e) in enumerate(
          zip(expert_models, original_benchmark.train_stream)
      ):  # type: ignore
          cine = e.classes_in_this_experience
          expert_models_l.append(
              ExModelExperience(
                  expert_model=m,
                  current_experience=i,
                  origin_stream=None,  # type: ignore
                  classes_in_this_experience=cine,
              )
          )
  
      expert_stream: CLStream[TExModelExperience] = CLStream(
          name="expert_models",
          exps_iter=expert_models_l,
          benchmark=self,
      )
      streams: List[CLStream[TExModelExperience]] = [expert_stream]
  
      self.original_benchmark = original_benchmark
      # for s in original_benchmark.streams.values():
      #     s = copy(s)
      #     s.name = 'original_' + s.name
      #     streams.append(s)
      super().__init__(streams)
  
file_path: avalanche/avalanche/benchmarks/scenarios/exmodel_scenario.py
imports: from typing import List, TypeVar
  from torch.nn import Module
  from .None import CLScenario, CLExperience, CLStream
label_desc: Use image node_id 1 to create a new ExModelCLScenario object from inherited base classes: CLScenario with example: obj = ExModelCLScenario(original_benchmark, expert_models)