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
47933b98
Commit
47933b98
authored
Nov 24, 2023
by
lintangsutawika
Browse files
gen_kwargs is parsed once
parent
fde2a1d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
lm_eval/evaluator.py
lm_eval/evaluator.py
+6
-2
No files found.
lm_eval/evaluator.py
View file @
47933b98
...
...
@@ -88,6 +88,11 @@ def simple_evaluate(
tasks
!=
[]
),
"No tasks specified, or no tasks found. Please verify the task names."
if
gen_kwargs
is
not
None
:
gen_kwargs
=
simple_parse_args_string
(
gen_kwargs
)
if
gen_kwargs
==
""
:
gen_kwargs
=
None
if
isinstance
(
model
,
str
):
if
model_args
is
None
:
model_args
=
""
...
...
@@ -122,8 +127,7 @@ def simple_evaluate(
continue
config
=
task_obj
.
_config
if
config
[
'output_type'
]
==
'greedy_until'
and
gen_kwargs
!=
""
:
gen_kwargs
=
simple_parse_args_string
(
gen_kwargs
)
if
config
[
'output_type'
]
==
'greedy_until'
and
gen_kwargs
is
not
None
:
config
[
'generation_kwargs'
].
update
(
gen_kwargs
)
if
num_fewshot
is
not
None
:
...
...
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