def train(self, output_dir: str = None):
        """
        We create a SetFitModel object from a pretrained model, then create a SetFitTrainer object with
        the model, and then train the model
        """
        from setfit import SetFitModel, SetFitTrainer

        self.trainer_model = SetFitModel.from_pretrained(**self.model_kwargs)
        self.trainer_kwargs["model"] = self.trainer_model
        self._trainer = SetFitTrainer(**self.trainer_kwargs)
        self._trainer.train()
        if self._eval_dataset:
            self._metrics = self._trainer.evaluate()
            self._logger.info(self._metrics)
        else:
            self._metrics = None

        if output_dir is not None:
            self.save(output_dir)

        We create a SetFitModel object from a pretrained model, then create a SetFitTrainer object with
        the model, and then train the model
        
argilla-v1/src/argilla_v1/training/setfit.py