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
d4889e1a
"docs/INSTALL.md" did not exist on "713e98bc1bfb842760df6be73b9520ee775d3c06"
Commit
d4889e1a
authored
Jun 14, 2023
by
gk
Browse files
Fix non-callable attributes in CachingLM
parent
8cec82b2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
lm_eval/base.py
lm_eval/base.py
+4
-0
lm_eval/evaluator.py
lm_eval/evaluator.py
+1
-1
No files found.
lm_eval/base.py
View file @
d4889e1a
...
@@ -868,6 +868,10 @@ class CachingLM:
...
@@ -868,6 +868,10 @@ class CachingLM:
lm
.
set_cache_hook
(
self
.
get_cache_hook
())
lm
.
set_cache_hook
(
self
.
get_cache_hook
())
def
__getattr__
(
self
,
attr
):
def
__getattr__
(
self
,
attr
):
lm_attr
=
getattr
(
self
.
lm
,
attr
)
if
not
callable
(
lm_attr
):
return
lm_attr
def
fn
(
requests
):
def
fn
(
requests
):
res
=
[]
res
=
[]
remaining_reqs
=
[]
remaining_reqs
=
[]
...
...
lm_eval/evaluator.py
View file @
d4889e1a
...
@@ -109,7 +109,7 @@ def simple_evaluate(
...
@@ -109,7 +109,7 @@ def simple_evaluate(
"model_args"
:
model_args
,
"model_args"
:
model_args
,
"num_fewshot"
:
num_fewshot
,
"num_fewshot"
:
num_fewshot
,
"batch_size"
:
batch_size
,
"batch_size"
:
batch_size
,
"batch_sizes"
:
list
(
lm
.
batch_sizes
.
values
()),
"batch_sizes"
:
list
(
lm
.
batch_sizes
.
values
())
if
hasattr
(
lm
,
"batch_sizes"
)
else
[]
,
"device"
:
device
,
"device"
:
device
,
"no_cache"
:
no_cache
,
"no_cache"
:
no_cache
,
"limit"
:
limit
,
"limit"
:
limit
,
...
...
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