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
0bafcef0
Unverified
Commit
0bafcef0
authored
Apr 26, 2024
by
Lintang Sutawika
Committed by
GitHub
Apr 26, 2024
Browse files
Fix Parameter Propagation for Tasks that have `include` (#1749)
* Update task.py * Update __init__.py
parent
594015b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
lm_eval/api/task.py
lm_eval/api/task.py
+1
-1
lm_eval/tasks/__init__.py
lm_eval/tasks/__init__.py
+5
-4
No files found.
lm_eval/api/task.py
View file @
0bafcef0
...
...
@@ -99,7 +99,7 @@ class TaskConfig(dict):
def
__post_init__
(
self
)
->
None
:
if
self
.
generation_kwargs
is
not
None
:
if
self
.
output_type
!=
"generate_until"
:
raise
ValueError
(
eval_logger
.
warning
(
f
"[
{
self
.
task
}
] passed `generation_kwargs`, but not using `output_type: generate_until`!"
)
...
...
lm_eval/tasks/__init__.py
View file @
0bafcef0
...
...
@@ -136,13 +136,14 @@ class TaskManager:
if
"include"
in
config
:
if
yaml_path
is
None
:
raise
ValueError
config
.
update
(
utils
.
load_yaml_config
(
config
=
{
**
utils
.
load_yaml_config
(
yaml_path
,
yaml_config
=
{
"include"
:
config
.
pop
(
"include"
)},
mode
=
"full"
,
)
)
),
**
config
,
}
if
self
.
_config_is_python_task
(
config
):
task_object
=
config
[
"class"
]()
else
:
...
...
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