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

Method get_examples

openprompt/data_utils/data_processor.py:127–141  ·  view source on GitHub ↗

get the :obj:`split` of dataset under :obj:`data_dir` :obj:`data_dir` is the base path of the dataset, for example: training file could be located in ``data_dir/train.txt`` Args: data_dir (str): the base path of the dataset split (str): ``train`` /

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

Source from the content-addressed store, hash-verified

125
126 @abstractmethod
127 def get_examples(self, data_dir: Optional[str] = None, split: Optional[str] = None) -> List[InputExample]:
128 """get the :obj:`split` of dataset under :obj:`data_dir`
129
130 :obj:`data_dir` is the base path of the dataset, for example:
131
132 training file could be located in ``data_dir/train.txt``
133
134 Args:
135 data_dir (str): the base path of the dataset
136 split (str): ``train`` / ``dev`` / ``test`` / ``unlabeled``
137
138 Returns:
139 List[InputExample]: return a list of :py:class:`~openprompt.data_utils.data_utils.InputExample`
140 """
141 raise NotImplementedError

Callers 4

get_train_examplesMethod · 0.95
get_dev_examplesMethod · 0.95
get_test_examplesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected