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

Method put

lit_nlp/lib/caching.py:103–105  ·  view source on GitHub ↗
(self, data, key: CacheKey)

Source from the content-addressed store, hash-verified

101 return self._lock
102
103 def put(self, data, key: CacheKey):
104 if key is not None:
105 self._d[key] = data
106
107 def get(self, key: CacheKey) -> Optional[Any]:
108 return self._d.get(key) if key is not None else None

Callers 4

test_preds_cacheMethod · 0.95
add_taskMethod · 0.80
fit_transformMethod · 0.80
predictMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_preds_cacheMethod · 0.76