Evaluate question answering with squad dataset
Hello everybodyI want to build question answering system by fine tuning bert using squad1.1 or squad2.0i would like to ask about evaluating question answering system, i know there issquadand squad_v2 metrics, how can we use them when fine-tune bert with pytorch?thank you
2021-10-07T17:26:22Z
This example should hopefully answer your question.github.comhuggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py#!/usr/bin/env python
# coding=utf-8
# Copyright 2020 The HuggingFace Team All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Fine-tuning the library models for question answering.
"""
# You can also adapt this script on your own question answering task. Pointers for this are left as comments.This file has been truncated.show originalIf the purpose is to have a good question answering model, you could also use one of the many pretrained models on the hugging face model hub.Models - Hugging Face
2021-10-10T07:29:15Z
thanks for your response