def to_dict(self) -> Dict[str, Any]:
        """Main method to generate the variables that will be written in the model card."""
        default_kwargs = {field.name: getattr(self, field.name) for field in fields(self)}

        kwargs = {
            "framework": self.framework.value,
            "trainer_task_call": self._trainer_task__repr__(),
            "predict_call": self._predict__repr__(),
        }

        if self.framework_kwargs:
            kwargs["framework_kwargs"] = str(self.framework_kwargs)

        if update_config_kwargs := self._update_config__repr__():
            kwargs["update_config_call"] = update_config_kwargs

        if extra_kwargs := self._to_dict():
            kwargs.update(**extra_kwargs)

        return {**default_kwargs, **kwargs}
Main method to generate the variables that will be written in the model card.
argilla-v1/src/argilla_v1/client/feedback/integrations/huggingface/model_card/model_card.py