MCPcopy Index your code
hub / github.com/thunlp/OpenPrompt / get_train_examples

Method get_train_examples

openprompt/data_utils/data_processor.py:94–100  ·  view source on GitHub ↗

get train examples from the training file under :obj:`data_dir` call ``get_examples(data_dir, "train")``, see :py:meth:`~openprompt.data_utils.data_processor.DataProcessor.get_examples`

(self, data_dir: Optional[str] = None)

Source from the content-addressed store, hash-verified

92 return len(self.labels)
93
94 def get_train_examples(self, data_dir: Optional[str] = None) -> InputExample:
95 """
96 get train examples from the training file under :obj:`data_dir`
97
98 call ``get_examples(data_dir, "train")``, see :py:meth:`~openprompt.data_utils.data_processor.DataProcessor.get_examples`
99 """
100 return self.get_examples(data_dir, "train")
101
102 def get_dev_examples(self, data_dir: Optional[str] = None) -> List[InputExample]:
103 """

Callers 15

5.1_BMInf_CPM.pyFile · 0.45
3.1_LMBFF.pyFile · 0.45
1.3_calibration.pyFile · 0.45
test_AgnewsProcessorFunction · 0.45
test_DBpediaProcessorFunction · 0.45
test_ImdbProcessorFunction · 0.45
test_SST2ProcessorFunction · 0.45
test_FewNERDProcessorFunction · 0.45

Calls 1

get_examplesMethod · 0.95

Tested by 11

test_AgnewsProcessorFunction · 0.36
test_DBpediaProcessorFunction · 0.36
test_ImdbProcessorFunction · 0.36
test_SST2ProcessorFunction · 0.36
test_FewNERDProcessorFunction · 0.36
test_TACREDProcessorFunction · 0.36
test_TACREVProcessorFunction · 0.36
test_ReTACREDProcessorFunction · 0.36
test_SemEvalProcessorFunction · 0.36
test_WebNLGProcessorFunction · 0.36
test_SNLIProcessorFunction · 0.36