/usr/local/lib/python3.6/site-packages/transformers/data/datasets/__pycache__
Edit: /usr/local/lib/python3.6/site-packages/transformers/data/datasets/__pycache__/squad.cpython-36.pyc (6058B)
3
EgJ# @ s d dl Z d dlZd dlmZmZ d dlmZ d dlmZm Z m
Z
mZ d dlZd dl
mZ d dlmZ ddlmZ dd lmZ dd
lmZ ddlmZmZmZmZ ejeZeej Z!e"d
d e!D Z#eG dd dZ$G dd deZ%G dd deZ&dS ) N) dataclassfield)Enum)DictListOptionalUnion)Dataset)FileLock )$MODEL_FOR_QUESTION_ANSWERING_MAPPING)PreTrainedTokenizer)logging )
SquadFeaturesSquadV1ProcessorSquadV2Processor"squad_convert_examples_to_featuresc c s | ]}|j V qd S )N)
model_type).0conf r J/usr/local/lib/python3.6/site-packages/transformers/data/datasets/squad.py
# s r c @ s e Zd ZU dZeddddje idZeedddidZ e eddd idZ
e
eddd
idZeedddidZ
e
ed
ddidZeedddidZeedddidZeedddidZeedddidZeedddidZeedddidZedS )SquadDataTrainingArgumentszb
Arguments pertaining to what data we are going to input our model for training and eval.
Nhelpz!Model type selected in the list: z, )defaultmetadatazFThe input data dir. Should contain the .json files for the SQuAD task. zThe maximum total input sequence length after tokenization. Sequences longer than this will be truncated, sequences shorter will be padded.zVWhen splitting up a long document into chunks, how much stride to take between chunks.@ zkThe maximum number of tokens for the question. Questions longer than this will be truncated to this length. zThe maximum length of an answer that can be generated. This is needed because the start and end predictions are not conditioned on one another.Fz1Overwrite the cached training and evaluation setszDIf true, the SQuAD examples contain some that do not have an answer.g zIIf null_score - best_non_null is greater than the threshold predict null. r zjlanguage id of input for language-specific xlm models (see tokenization_xlm.PRETRAINED_INIT_CONFIGURATION) z3multiple threads for converting example to features)__name__
__module____qualname____doc__r joinMODEL_TYPESr strdata_dirmax_seq_lengthint
doc_stridemax_query_lengthZmax_answer_lengthoverwrite_cacheboolversion_2_with_negativeZnull_score_diff_thresholdfloatZn_best_sizelang_idthreadsr r r r r &