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

Method key_fn

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

Source from the content-addressed store, hash-verified

28 """Implements lit.Model interface for a set of pre-computed predictions."""
29
30 def key_fn(self, example: JsonDict) -> str:
31 reduced_example: JsonDict = {
32 k: example[k]
33 for k in self.input_identifier_keys
34 }
35 return caching.input_hash(reduced_example)
36
37 def description(self):
38 return self._description

Callers 2

__init__Method · 0.95
_predict_singleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected