(window.webpackJsonp=window.webpackJsonp||[]).push([[220],{1269:function(a,i){a.exports={attributes:{title:"Text classification",description:'When a RatingQuestion, LabelQuestion or MultiLabelQuestion is present in the datasets, we can define a TrainingTaskForTextClassification to use our ArgillaTrainer integration for fine-tuning with "openai", "setfit", "peft", "spacy" and "transformers".',links:[{linkText:"Argilla unification docs",linkLink:"https://docs.argilla.io/en/latest/guides/llms/practical_guides/collect_responses.html#solve-disagreements"},{linkText:"Argilla fine-tuning docs",linkLink:"https://docs.argilla.io/en/latest/guides/llms/practical_guides/fine_tune.html#text-classification"},{linkText:"ArgillaTrainer docs",linkLink:"https://docs.argilla.io/en/latest/guides/train_a_model.html#the-argillatrainer"}]},body:'```python\nimport argilla.feedback import ArgillaTrainer, FeedbackDataset, TrainingTask\n\ndataset = FeedbackDataset.from_argilla(\n    name="<my_dataset_name>",\n    workspace="<my_workspace_name>"\n)\ntask = TrainingTask.for_text_classification(\n    text=dataset.field_by_name("<my_field>"),\n    label=dataset.question_by_name("<my_question>")\n)\ntrainer = ArgillaTrainer(\n    dataset=dataset,\n    task=task,\n    framework="<my_framework>",\n)\ntrainer.update_config()\ntrainer.train()\n```'}}}]);