docstr: We create a SetFitModel object from a pretrained model, then create a SetFitTrainer object with
  the model, and then train the model
docstr_tok: ["We","create","a","SetFitModel","object","from","a","pretrained","model",",","then","create","a","SetFitTrainer","object","with","the","model",",","and","then","train","the","model"]
code: 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)
  
file_path: argilla/src/argilla/training/span_marker.py
imports: import logging
  from typing import List, Union
  from datasets import DatasetDict
  from argilla.client.models import TokenClassificationRecord
  from argilla.training.base import ArgillaTrainerSkeleton
  from argilla.training.utils import filter_allowed_args, get_default_args
  from argilla.utils.dependency import require_dependencies
label_desc: Use image node_id 6 for calling the ArgillaSpanMarkerTrainer obj's underlying member method code with example usage: obj.train(output_dir) without return types