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

Method delete_pred_lock

lit_nlp/lib/caching.py:155–160  ·  view source on GitHub ↗

Remove the lock from the map to clean up, returns it.

(self, keys: list[CacheKey])

Source from the content-addressed store, hash-verified

153 return pred_lock
154
155 def delete_pred_lock(self, keys: list[CacheKey]) -> Optional[threading.RLock]:
156 """Remove the lock from the map to clean up, returns it."""
157 pl_key = self.pred_lock_key(keys)
158 if pl_key is None:
159 return None
160 return self._pred_locks.pop(pl_key)
161
162 def save_to_disk(self):
163 """Save cache data to disk."""

Callers 2

test_delete_pred_lockMethod · 0.95
predictMethod · 0.80

Calls 1

pred_lock_keyMethod · 0.95

Tested by 1

test_delete_pred_lockMethod · 0.76