Training#

Here we describe the available trainers in Argilla:

  • Base Trainer: Internal mechanism to handle Trainers

  • SetFit Trainer: Internal mechanism for handling training logic of SetFit models

  • OpenAI Trainer: Internal mechanism for handling training logic of OpenAI models

  • PEFT (LoRA) Trainer: Internal mechanism for handling training logic of PEFT (LoRA) models

  • AutoTrain Trainer: Internal mechanism for handling training logic of AutoTrain models

  • spaCy Trainer: Internal mechanism for handling training logic of spaCy models

  • Transformers Trainer: Internal mechanism for handling training logic of Transformers models

  • SpanMarker Trainer: Internal mechanism for handling training logic of SpanMarker models

Base Trainer#

class argilla.training.base.ArgillaTrainerSkeleton(name, dataset, record_class, workspace=None, multi_label=False, settings=None, model=None, seed=None, *arg, **kwargs)#
Parameters:
abstract init_model()#

Initializes a model.

abstract init_training_args()#

Initializes the training arguments.

abstract predict(text, as_argilla_records=True, **kwargs)#

Predicts the label of the text.

Parameters:
  • text (Union[List[str], str]) โ€“

  • as_argilla_records (bool) โ€“

abstract save(output_dir)#

Saves the model to the specified path.

Parameters:

output_dir (str) โ€“

abstract train(output_dir=None)#

Trains the model.

Parameters:

output_dir (Optional[str]) โ€“

abstract update_config(*args, **kwargs)#

Updates the configuration of the trainer, but the parameters depend on the trainer.subclass.

SetFit Trainer#

OpenAI Trainer#

PEFT (LoRA) Trainer#

AutoTrain Trainer#

spaCy Trainer#

Transformers Trainer#

SpanMarker Trainer#