def __init__()

in optimum/executorch/modeling.py [0:0]


    def __init__(self, models: Dict[str, "ExecuTorchModule"], config: "PretrainedConfig"):
        super().__init__(model=None, config=config)

        if self.__class__.auto_model_class is None:
            raise ValueError(
                f"Class {self.__class__.__name__} must set auto_model_class. "
                f"This attribute is used to identify the corresponding AutoModel class."
            )

        if len(models) == 1:
            # For single PTE, always set the attr to "model"
            setattr(self, "model", next(iter(models.values())))
        else:
            for key, value in models.items():
                setattr(self, key, value)

        self.stats = Stats()