"vscode:/vscode.git/clone" did not exist on "e888406eafc5084bbf39db39239687240a8ffddf"
Unverified Commit e922cceb authored by Baber Abbasi's avatar Baber Abbasi Committed by GitHub
Browse files

fix cache (#2037)

parent 801322e0
...@@ -246,9 +246,10 @@ class CachingLM: ...@@ -246,9 +246,10 @@ class CachingLM:
# add hook to lm # add hook to lm
lm.set_cache_hook(self.get_cache_hook()) lm.set_cache_hook(self.get_cache_hook())
def __getattr__(self, attr): def __getattr__(self, attr: str):
lm_attr = getattr(self.lm, attr) lm_attr = getattr(self.lm, attr)
if not callable(lm_attr): if attr not in ["loglikelihood", "loglikelihood_rolling", "generate_until"]:
eval_logger.debug(f"Passing through attribute '{attr}' to underlying LM")
return lm_attr return lm_attr
def fn(requests): def fn(requests):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment