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

Method _predict_single

lit_nlp/components/static_preds.py:73–78  ·  view source on GitHub ↗
(self, example: JsonDict)

Source from the content-addressed store, hash-verified

71 }
72
73 def _predict_single(self, example: JsonDict):
74 key = self.key_fn(example)
75 if key not in self._index:
76 raise KeyError(
77 f'Example {key} not found in stored predictions: {str(example)}')
78 return self._index[key]
79
80 ##
81 # LIT API implementation

Callers

nothing calls this directly

Calls 1

key_fnMethod · 0.95

Tested by

no test coverage detected