def train(self, output_dir: str):
        """
        We create a SetFitModel object from a pretrained model, then create a SetFitTrainer object with
        the model, and then train the model
        """
        from span_marker import Trainer
        from transformers import TrainingArguments

        self.trainer_kwargs["output_dir"] = output_dir

        # prepare data
        self.init_model()

        # set trainer
        self.trainer = Trainer(
            args=TrainingArguments(**self.trainer_kwargs),
            model=self.trainer_model,
            train_dataset=self._train_dataset,
            eval_dataset=self._eval_dataset,
        )

        # train
        self.trainer.train()
        if self._eval_dataset:
            self._metrics = self.trainer.evaluate()
            self._logger.info(self._metrics)
        else:
            self._metrics = 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/span_marker.py