-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #362 from EleutherAI/cleanup-for-release
Cleanup `README.md` and package deps
- Loading branch information
Showing
26 changed files
with
434 additions
and
440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,52 @@ | ||
""" | ||
Usage: | ||
python make_table_tasks.py --output <markdown_filename> | ||
""" | ||
import argparse | ||
import logging | ||
from lm_eval import tasks | ||
from pytablewriter import MarkdownTableWriter | ||
|
||
writer = MarkdownTableWriter() | ||
writer.headers = ["Task Name", "Train", "Val", "Test", "Val/Test Docs", "Metrics"] | ||
|
||
values = [] | ||
logging.basicConfig(level=logging.INFO) | ||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def chk(tf): | ||
def check(tf): | ||
if tf: | ||
return "✓" | ||
else: | ||
return " " | ||
|
||
|
||
for tname, Task in tasks.TASK_REGISTRY.items(): | ||
task = Task() | ||
|
||
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 | ||
|
||
print(writer.dumps()) | ||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument("--output", type=str, default="task_table.md") | ||
args = parser.parse_args() | ||
|
||
writer = MarkdownTableWriter() | ||
writer.headers = ["Task Name", "Train", "Val", "Test", "Val/Test Docs", "Metrics"] | ||
values = [] | ||
|
||
tasks = tasks.TASK_REGISTRY.items() | ||
tasks = sorted(tasks, key=lambda x: x[0]) | ||
for tname, Task in tasks: | ||
task = Task() | ||
v = [ | ||
tname, | ||
check(task.has_training_docs()), | ||
check(task.has_validation_docs()), | ||
check(task.has_test_docs()), | ||
len( | ||
list( | ||
task.test_docs() if task.has_test_docs() else task.validation_docs() | ||
) | ||
), | ||
", ".join(task.aggregation().keys()), | ||
] | ||
logger.info(v) | ||
values.append(v) | ||
writer.value_matrix = values | ||
table = writer.dumps() | ||
with open(args.output, "w") as f: | ||
f.write(table) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+1.72 KB
...5c18295ff6cc3c6e86268f404cfed5aee8428.pkl → ...43931d7f3f0b696970bcba31f9b52bdf12297.pkl
Binary file not shown.
Binary file renamed
BIN
+1.77 KB
...8e67a3582f72655c7bfaab017c471f8216a1d.pkl → ...2572b95bb57b334fc0752c89a7e045a5f63ae.pkl
Binary file not shown.
Binary file renamed
BIN
+1.92 KB
...d24ddcdfa906b8675a9f551f84b7bd5810e73.pkl → ...a2ecba7f0c19f9e39f2aaf2bf440bfe328004.pkl
Binary file not shown.
Binary file renamed
BIN
+2.76 KB
...48f355948bcb1dfc73c6cd12e5fa8ebc8390c.pkl → ...3306a5872c400a3872f744280b237455a0f8e.pkl
Binary file not shown.
Binary file renamed
BIN
+2.37 KB
...4bb6cc4e0ba82260189e55e66e6086654f28a.pkl → ...188b1b2bc103a421c676ee4b2142a68b43516.pkl
Binary file not shown.
Binary file renamed
BIN
+1.87 KB
...2ac6782d0b9fe6e6cb93b77919fe5a4d377ed.pkl → ...98d6fe329299d086a4659743a41f4a4012659.pkl
Binary file not shown.
Binary file renamed
BIN
+1.69 KB
...1e542813e8949f6e6f8471a8b2f4a144ba6d6.pkl → ...f255ae19e9e061d533256bdf75b04e0a917ab.pkl
Binary file not shown.
Binary file renamed
BIN
+1.72 KB
...e33658074b94e7eef68b6282ce7b2f76422ea.pkl → ...af419cfac89538d4ab7745621e339394c0c23.pkl
Binary file not shown.
Binary file renamed
BIN
+1.75 KB
...043c89b6816221ef36286b15969febee34757.pkl → ...5fe35822d650aefdc5fbeeaf0c1724effbe09.pkl
Binary file not shown.
Binary file renamed
BIN
+1.89 KB
...0a4bcac0bf275fc6ea96d499fb22f5a4c8736.pkl → ...328c759574fa3ec9751631025f8ad5ebf9f3e.pkl
Binary file not shown.
Binary file renamed
BIN
+1.73 KB
...3c138b7c17480ffb420d019adb59c367beba6.pkl → ...e4c010d888065f55a8f1b863bc1eb0340a5f2.pkl
Binary file not shown.
Binary file renamed
BIN
+1.69 KB
...681a99d6adada4874a100d5700817bd601615.pkl → ...24ddeb538de2ffe108c1370dd74ce6ac8038d.pkl
Binary file not shown.
Binary file renamed
BIN
+1.73 KB
...47c13aa91bbeff15a1cb72d80ad13b49d3434.pkl → ...8137398a0885ca5d5d98f515404fb6aeb99e7.pkl
Binary file not shown.
Binary file renamed
BIN
+1.76 KB
...64ee44ada219a1a93f90e43b3e0855c8f5e28.pkl → ...ffa4546728dd150a67c0a0ddc8675c04e15d1.pkl
Binary file not shown.
Binary file renamed
BIN
+1.83 KB
...c1afe579667127dc46033eec75e7617f13cd6.pkl → ...93639e7e2261d98de58159d15ccb83131bf4e.pkl
Binary file not shown.