Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
e922cceb
Unverified
Commit
e922cceb
authored
Jun 28, 2024
by
Baber Abbasi
Committed by
GitHub
Jun 28, 2024
Browse files
fix cache (#2037)
parent
801322e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lm_eval/api/model.py
lm_eval/api/model.py
+3
-2
No files found.
lm_eval/api/model.py
View file @
e922cceb
...
...
@@ -246,9 +246,10 @@ class CachingLM:
# add hook to lm
lm
.
set_cache_hook
(
self
.
get_cache_hook
())
def
__getattr__
(
self
,
attr
):
def
__getattr__
(
self
,
attr
:
str
):
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
def
fn
(
requests
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment