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
ba75c838
Commit
ba75c838
authored
Jul 21, 2023
by
baberabb
Browse files
changed task_class fixture
parent
3864b560
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
tests/test_tasks.py
tests/test_tasks.py
+3
-4
No files found.
tests/test_tasks.py
View file @
ba75c838
...
@@ -4,10 +4,9 @@ from typing import List
...
@@ -4,10 +4,9 @@ from typing import List
import
lm_eval.tasks
as
tasks
import
lm_eval.tasks
as
tasks
from
lm_eval.api.task
import
ConfigurableTask
from
lm_eval.api.task
import
ConfigurableTask
# Using fixtures to get the task class and limit
@
pytest
.
fixture
()
@
pytest
.
fixture
()
def
task_class
(
task_name
:
List
[
str
]
=
None
)
->
ConfigurableTask
:
def
task_class
(
task_name
:
List
[
str
])
->
ConfigurableTask
:
if
task_name
is
None
:
task_name
=
[
"arc_easy"
]
task_name
=
[
"arc_easy"
]
x
=
[
cls
for
name
,
cls
in
tasks
.
TASK_REGISTRY
.
items
()
if
name
in
task_name
]
x
=
[
cls
for
name
,
cls
in
tasks
.
TASK_REGISTRY
.
items
()
if
name
in
task_name
]
return
x
[
0
]
return
x
[
0
]
...
...
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