(window.webpackJsonp=window.webpackJsonp||[]).push([[205],{1278:function(t,e){t.exports={attributes:{title:"Text classification",description:"When a RatingQuestion, LabelQuestion or MultiLabelQuestion is present in the datasets, we can define a TrainingTaskMappingForTextClassification 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_others.html#text-classification"},{linkText:"ArgillaTrainer docs",linkLink:"https://docs.argilla.io/en/latest/guides/train_a_model.html#the-argillatrainer"}]},html:'<pre><code class="language-python">import argilla.feedback import ArgillaTrainer, FeedbackDataset, TrainingTaskMapping\n\ndataset = FeedbackDataset.from_argilla(\n    name=&quot;&lt;my_dataset_name&gt;&quot;,\n    workspace=&quot;&lt;my_workspace_name&gt;&quot;\n)\ntask_mapping = TrainingTaskMapping.for_text_classification(\n    text=dataset.field_by_name(&quot;&lt;my_field&gt;&quot;),\n    label=dataset.question_by_name(&quot;&lt;my_question&gt;&quot;)\n)\ntrainer = ArgillaTrainer(\n    dataset=dataset,\n    task_mapping=task_mapping,\n    framework=&quot;&lt;my_framework&gt;&quot;,\n)\ntrainer.update_config()\ntrainer.train()\n</code></pre>\n'}}}]);