MCPcopy Create free account
hub / github.com/PAIR-code/lit / _run_annotators

Method _run_annotators

lit_nlp/app.py:857–864  ·  view source on GitHub ↗
(self,
                      dataset: lit_dataset.Dataset)

Source from the content-addressed store, hash-verified

855 interpreter=interpreter_name)
856
857 def _run_annotators(self,
858 dataset: lit_dataset.Dataset) -> lit_dataset.Dataset:
859 datapoints = [dict(ex) for ex in dataset.examples]
860 annotated_spec = dict(dataset.spec())
861 for annotator in self._annotators:
862 annotator.annotate(datapoints, dataset, annotated_spec)
863 return lit_dataset.Dataset(
864 base=dataset, examples=datapoints, spec=annotated_spec)
865
866 def make_handler(self, fn):
867 """Convenience wrapper to handle args and serialization.

Callers 5

_annotate_new_dataMethod · 0.95
_create_datasetMethod · 0.95
_create_modelMethod · 0.95
annotate_generatedMethod · 0.95
__init__Method · 0.95

Calls 2

specMethod · 0.45
annotateMethod · 0.45

Tested by

no test coverage detected