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

Method get_labels

openprompt/data_utils/data_processor.py:78–84  ·  view source on GitHub ↗

get labels of the dataset Returns: List[Any]: labels of the dataset

(self)

Source from the content-addressed store, hash-verified

76 return self.label_mapping[label] if label is not None else None
77
78 def get_labels(self) -> List[Any]:
79 """get labels of the dataset
80
81 Returns:
82 List[Any]: labels of the dataset
83 """
84 return self.labels
85
86 def get_num_labels(self):
87 """get the number of labels in the dataset

Callers 10

test_AgnewsProcessorFunction · 0.80
test_SST2ProcessorFunction · 0.80
test_FewNERDProcessorFunction · 0.80
test_TACREDProcessorFunction · 0.80
test_TACREVProcessorFunction · 0.80
test_ReTACREDProcessorFunction · 0.80
test_SemEvalProcessorFunction · 0.80
test_SNLIProcessorFunction · 0.80

Calls

no outgoing calls

Tested by 8

test_AgnewsProcessorFunction · 0.64
test_SST2ProcessorFunction · 0.64
test_FewNERDProcessorFunction · 0.64
test_TACREDProcessorFunction · 0.64
test_TACREVProcessorFunction · 0.64
test_ReTACREDProcessorFunction · 0.64
test_SemEvalProcessorFunction · 0.64
test_SNLIProcessorFunction · 0.64