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
23dcc12e
Unverified
Commit
23dcc12e
authored
Jun 12, 2023
by
Stella Biderman
Committed by
GitHub
Jun 12, 2023
Browse files
Merge pull request #575 from poedator/patch-1
Update evaluator.py cache_db argument str if model is not str
parents
b21c8f3d
811252b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lm_eval/evaluator.py
lm_eval/evaluator.py
+2
-2
No files found.
lm_eval/evaluator.py
View file @
23dcc12e
...
...
@@ -77,7 +77,7 @@ def simple_evaluate(
lm
=
lm_eval
.
base
.
CachingLM
(
lm
,
"lm_cache/"
+
model
+
(
model
if
isinstance
(
model
,
str
)
else
model
.
model
.
config
.
_name_or_path
)
+
"_"
+
model_args
.
replace
(
"="
,
"-"
).
replace
(
","
,
"_"
).
replace
(
"/"
,
"-"
)
+
".db"
,
...
...
@@ -102,7 +102,7 @@ def simple_evaluate(
# add info about the model and few shot config
results
[
"config"
]
=
{
"model"
:
model
,
"model"
:
(
model
if
isinstance
(
model
,
str
)
else
model
.
model
.
config
.
_name_or_path
)
,
"model_args"
:
model_args
,
"num_fewshot"
:
num_fewshot
,
"batch_size"
:
batch_size
,
...
...
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