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
7fe0ced5
Commit
7fe0ced5
authored
Jan 25, 2024
by
lintangsutawika
Browse files
fix group being loaded with a None
parent
60f52803
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
lm_eval/tasks/__init__.py
lm_eval/tasks/__init__.py
+2
-3
No files found.
lm_eval/tasks/__init__.py
View file @
7fe0ced5
...
@@ -165,10 +165,9 @@ class TaskManager(abc.ABC):
...
@@ -165,10 +165,9 @@ class TaskManager(abc.ABC):
group_name
=
name_or_config
[
"group"
]
group_name
=
name_or_config
[
"group"
]
subtask_list
=
name_or_config
[
"task"
]
subtask_list
=
name_or_config
[
"task"
]
if
(
self
.
_name_is_registered
(
group_name
)
is
False
)
or
(
self
.
_get_yaml_path
(
group_name
)
==
-
1
):
all_subtasks
=
{}
if
(
parent_name
is
not
None
)
and
((
self
.
_name_is_registered
(
group_name
)
is
False
)
or
(
self
.
_get_yaml_path
(
group_name
)
==
-
1
)):
all_subtasks
=
{
group_name
:
(
parent_name
,
None
)}
all_subtasks
=
{
group_name
:
(
parent_name
,
None
)}
else
:
all_subtasks
=
{}
fn
=
partial
(
self
.
_load_individual_task_or_group
,
parent_name
=
group_name
,
update_config
=
update_config
)
fn
=
partial
(
self
.
_load_individual_task_or_group
,
parent_name
=
group_name
,
update_config
=
update_config
)
all_subtasks
=
{
**
all_subtasks
,
**
dict
(
collections
.
ChainMap
(
*
map
(
fn
,
subtask_list
)))}
all_subtasks
=
{
**
all_subtasks
,
**
dict
(
collections
.
ChainMap
(
*
map
(
fn
,
subtask_list
)))}
...
...
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