
'''simple docstring'''





from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Features, Sequence, Value
from .base import TaskTemplate

@dataclass(frozen=__snake_case    )
class 						a   (				__snake_case    ):
				# `task` is not a ClassVar since we want it to be part of the `asdict` output for JSON serialization
				_snake_case		    = field(default='''question-answering-extractive'''				,metadata={'''include_in_asdict_even_if_is_default''': True}    )
				_snake_case		    = Features({'''question''': Value('''string'''    ), '''context''': Value('''string'''    )}    )
				_snake_case		    = Features(
				    {
				        '''answers''': Sequence(
				            {
				                '''text''': Value('''string'''    ),
				                '''answer_start''': Value('''int32'''    ),
				            }    )
				    }    )
				_snake_case		    = '''question'''
				_snake_case		    = '''context'''
				_snake_case		    = '''answers'''




				@property
				def 	__snake_case							(							self	:				Optional[Any]      ):
										return {self.question_column: "question", self.context_column: "context", self.answers_column: "answers"}





'''simple docstring'''





import os
import sys

UpperCAmelCase    					=   os.path.join(os.path.dirname(__file__), "src")
sys.path.append(SRC_DIR)


from transformers import (
    AutoConfig,
    AutoModel,
    AutoModelForCausalLM,
    AutoModelForMaskedLM,
    AutoModelForQuestionAnswering,
    AutoModelForSequenceClassification,
    AutoTokenizer,
    add_start_docstrings,
)


UpperCAmelCase    					=   [
    "torch",
    "numpy",
    "tokenizers",
    "filelock",
    "requests",
    "tqdm",
    "regex",
    "sentencepiece",
    "sacremoses",
    "importlib_metadata",
    "huggingface_hub",
]

@add_start_docstrings(AutoConfig.__doc__       )
def      A (       *A_							:					Optional[Any]    ,							**A_							:					List[str]       ):
						return AutoConfig.from_pretrained(*A_    ,							**A_       )

@add_start_docstrings(AutoTokenizer.__doc__       )
def      A (       *A_							:					Dict    ,							**A_							:					str       ):
						return AutoTokenizer.from_pretrained(*A_    ,							**A_       )

@add_start_docstrings(AutoModel.__doc__       )
def      A (       *A_							:					Union[str, Any]    ,							**A_							:					Optional[Any]       ):
						return AutoModel.from_pretrained(*A_    ,							**A_       )

@add_start_docstrings(AutoModelForCausalLM.__doc__       )
def      A (       *A_							:					str    ,							**A_							:					Optional[Any]       ):
						return AutoModelForCausalLM.from_pretrained(*A_    ,							**A_       )

@add_start_docstrings(AutoModelForMaskedLM.__doc__       )
def      A (       *A_							:					List[str]    ,							**A_							:					Optional[Any]       ):
						return AutoModelForMaskedLM.from_pretrained(*A_    ,							**A_       )

@add_start_docstrings(AutoModelForSequenceClassification.__doc__       )
def      A (       *A_							:					Tuple    ,							**A_							:					List[str]       ):
						return AutoModelForSequenceClassification.from_pretrained(*A_    ,							**A_       )





@add_start_docstrings(AutoModelForQuestionAnswering.__doc__       )
def      A (       *A_							:					Tuple    ,							**A_							:					Any       ):
						return AutoModelForQuestionAnswering.from_pretrained(*A_    ,							**A_       )

