MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / CacheHook

Class CacheHook

test/general/lm_eval/base.py:866–878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

864
865
866class CacheHook:
867 def __init__(self, cachinglm):
868 if cachinglm is None:
869 self.dbdict = None
870 return
871
872 self.dbdict = cachinglm.dbdict
873
874 def add_partial(self, attr, req, res):
875 if self.dbdict is None:
876 return
877 hsh = hash_args(attr, req)
878 self.dbdict[hsh] = res
879
880
881class CachingLM:

Callers 2

__init__Method · 0.85
get_cache_hookMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected