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
2a92cde0
Commit
2a92cde0
authored
Jun 27, 2023
by
haileyschoelkopf
Browse files
fix issue with dumping model_name to results
parent
e0498dd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
lm_eval/evaluator.py
lm_eval/evaluator.py
+6
-1
No files found.
lm_eval/evaluator.py
View file @
2a92cde0
...
@@ -113,8 +113,13 @@ def simple_evaluate(
...
@@ -113,8 +113,13 @@ def simple_evaluate(
)
)
# add info about the model and few shot config
# add info about the model and few shot config
model_name
=
None
if
isinstance
(
model
,
str
):
model_name
=
model
elif
isinstance
(
model
,
transformers
.
PreTrainedModel
):
model_name
=
"pretrained="
+
model
.
config
.
_name_or_path
results
[
"config"
]
=
{
results
[
"config"
]
=
{
"model"
:
(
model
if
isinstance
(
model
,
str
)
else
model
.
model
.
config
.
_name_or_path
)
,
"model"
:
model
_name
,
"model_args"
:
model_args
,
"model_args"
:
model_args
,
"num_fewshot"
:
num_fewshot
,
"num_fewshot"
:
num_fewshot
,
"batch_size"
:
batch_size
,
"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