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
47e3ae6c
Commit
47e3ae6c
authored
May 12, 2021
by
Leo Gao
Browse files
Add column to task table
parent
43f4d418
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
scripts/make_table_tasks.py
scripts/make_table_tasks.py
+4
-2
No files found.
scripts/make_table_tasks.py
View file @
47e3ae6c
...
@@ -2,7 +2,7 @@ from lm_eval import tasks
...
@@ -2,7 +2,7 @@ from lm_eval import tasks
from
pytablewriter
import
MarkdownTableWriter
from
pytablewriter
import
MarkdownTableWriter
writer
=
MarkdownTableWriter
()
writer
=
MarkdownTableWriter
()
writer
.
headers
=
[
"Task Name"
,
"Train"
,
"Val"
,
"Test"
,
"Metrics"
]
writer
.
headers
=
[
"Task Name"
,
"Train"
,
"Val"
,
"Test"
,
"Val/Test Docs"
,
"Metrics"
]
values
=
[]
values
=
[]
...
@@ -15,7 +15,9 @@ def chk(tf):
...
@@ -15,7 +15,9 @@ def chk(tf):
for
tname
,
Task
in
tasks
.
TASK_REGISTRY
.
items
():
for
tname
,
Task
in
tasks
.
TASK_REGISTRY
.
items
():
task
=
Task
()
task
=
Task
()
values
.
append
([
tname
,
chk
(
task
.
has_training_docs
()),
chk
(
task
.
has_validation_docs
()),
chk
(
task
.
has_test_docs
()),
', '
.
join
(
task
.
aggregation
().
keys
())])
v
=
[
tname
,
chk
(
task
.
has_training_docs
()),
chk
(
task
.
has_validation_docs
()),
chk
(
task
.
has_test_docs
()),
len
(
list
(
task
.
test_docs
()
if
task
.
has_test_docs
()
else
task
.
validation_docs
())),
', '
.
join
(
task
.
aggregation
().
keys
())]
print
(
v
)
values
.
append
(
v
)
writer
.
value_matrix
=
values
writer
.
value_matrix
=
values
...
...
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