(window.webpackJsonp=window.webpackJsonp||[]).push([[284],{1464:function(n,e){n.exports={attributes:{title:"SetFit",description:"The ArgillaSetFitTrainer leverages the features of SetFit to train programmatically with Argilla.",links:[{linkText:"Argilla docs",linkLink:"https://docs.argilla.io/en/latest/practical_guides/fine_tune.html#text-classification"},{linkText:"SetFit docs",linkLink:"https://github.com/huggingface/setfit"}]},body:'*code snippet*\n\n```python\nfrom argilla.training import ArgillaTrainer\n\ntrainer = ArgillaTrainer(\n    name="<my_dataset_name>",\n    workspace="<my_workspace_name>",\n    framework="setfit",\n    train_size=0.8\n)\ntrainer.update_config(num_iterations=10)\ntrainer.train(output_dir="text-classification")\nrecords = trainer.predict("The ArgillaTrainer is great!", as_argilla_records=True)\n```\n\n*update training config*\n\n```python\ntrainer.update_config(\n    dev_corpus = "corpora.dev",\n    train_corpus = "corpora.train",\n    seed = 42,\n    gpu_allocator = 0,\n    accumulate_gradient = 1,\n    patience = 1600,\n    max_epochs = 0,\n    max_steps = 20000,\n    eval_frequency = 200,\n    frozen_components = [],\n    annotating_components = [],\n    before_to_disk = None,\n    before_update = None\n)\n```\n'}}}]);