Datasets:
Download code/scripts_seqroute/test_families.py from divy123/sequential-router-v2: direct link, hf CLI and curl.
- Browser
- Download file 959 Bytes
-
https://huggingface.co/datasets/divy123/sequential-router-v2/resolve/main/code/scripts_seqroute/test_families.py
- Command line
-
hf download hf://datasets/divy123/sequential-router-v2/code/scripts_seqroute/test_families.py
-
curl -L -o test_families.py https://huggingface.co/datasets/divy123/sequential-router-v2/resolve/main/code/scripts_seqroute/test_families.py
959 Bytes
| import sys, time, pickle | |
| sys.path.insert(0, "src"); sys.path.insert(0, ".") | |
| from llmroute.seqroute import families as F, synth as S | |
| fns = [F.math_word, F.math_competition, F.knowledge, F.science, F.logic_reasoning, F.code_generation, F.code_repair_humanevalfix, F.summ_news, F.summ_abstractive, F.simplification, F.translation, | |
| F.information_extraction, F.classification, F.json_generation, S.instruction_following, F.long_context_qa, F.reading_comprehension, F.table_reasoning, S.planning, F.multilingual] | |
| only = sys.argv[1:] | |
| for fn in fns: | |
| if only and fn.__name__ not in only: continue | |
| t = time.time() | |
| try: | |
| rows = fn() | |
| import collections | |
| c = collections.Counter(r["source_dataset"] for r in rows) | |
| print(fn.__name__, len(rows), dict(list(c.items())[:8]), f"{time.time()-t:.0f}s", flush=True) | |
| except Exception as e: | |
| import traceback; traceback.print_exc(); print("FAIL", fn.__name__, flush=True) | |