(window.webpackJsonp=window.webpackJsonp||[]).push([[277],{1457:function(n,e){n.exports={attributes:{title:"Question Answering",description:'When two TextFields and a TextQuestion are present in the datasets, we can define a TrainingTaskForQuestionAnswering to use our ArgillaTrainer integration for fine-tuning with "transformers".',links:[{linkText:"Practical guide to Question Answering",linkLink:"https://docs.argilla.io/en/latest/practical_guides/fine_tune.html#question-answering"}]},body:'```python\nfrom 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_question_answering(\n    question=dataset.field_by_name("<my_field>"),\n    context=dataset.field_by_name("<my_field>"),\n    answer=dataset.question_by_name("<my_field>"),\n)\ntrainer = ArgillaTrainer(\n    dataset=dataset,\n    task=task,\n    framework="transformers",\n)\ntrainer.update_config()\ntrainer.train()\n```'}}}]);