MCPcopy Create free account
hub / github.com/huggingface/transformers / InputExample

Class InputExample

examples/multiple-choice/utils_multiple_choice.py:38–55  ·  view source on GitHub ↗

A single training/test example for multiple choice Args: example_id: Unique id for the example. question: string. The untokenized text of the second sequence (question). contexts: list of str. The untokenized text of the first sequence (context of corresponding ques

Source from the content-addressed store, hash-verified

36
37@dataclass(frozen=True)
38class InputExample:
39 """
40 A single training/test example for multiple choice
41
42 Args:
43 example_id: Unique id for the example.
44 question: string. The untokenized text of the second sequence (question).
45 contexts: list of str. The untokenized text of the first sequence (context of corresponding question).
46 endings: list of str. multiple choice's options. Its length must be equal to contexts' length.
47 label: (Optional) string. The label of the example. This should be
48 specified for train and dev examples, but not for test examples.
49 """
50
51 example_id: str
52 question: str
53 contexts: List[str]
54 endings: List[str]
55 label: Optional[str]
56
57
58@dataclass(frozen=True)

Callers 4

_create_examplesMethod · 0.70
_create_examplesMethod · 0.70
_create_examplesMethod · 0.70
_create_examplesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected