nx_qabench_fetch_big.nx source
↩ module page · 20 lines · 1275 B
1// nx_qabench_fetch_big.nx -- GROW the benchmark eval sets via pagination (the dynamic fetcher, proven). Pages
2// the HF datasets-server offset/length API to fetch 300 rows each of SQuAD + HotpotQA into growing .raw files
3// (concatenated page responses; the record-scanning parsers find records across pages). Bigger N = more robust
4// F1. Run SOLO. expect_exit: 0 license_tier: ORIGINAL
5import "nx_research_fetch_ext.nx"
6
7func main() -> i64 {
8 let store: *TrustStore = rf_init()
9 if (store as i64) == 0 { rf_puts("qabbig: trust store load failed\n" as *u8); return 1 }
10 rf_puts("CA roots="); rf_putn(trust_store_count(store)); rf_puts(" -- GROW eval sets to 300 rows via pagination\n" as *u8)
11
12 rf_section("SQuAD v1.1 validation -> 300 rows (3 x 100 pages)" as *u8)
13 rf_fetch_bank_paged("https://datasets-server.huggingface.co/rows?dataset=rajpurkar/squad&config=plain_text&split=validation" as *u8, "qab_squad_big" as *u8, store, 100, 3)
14
15 rf_section("HotpotQA distractor validation -> 300 rows (3 x 100 pages)" as *u8)
16 rf_fetch_bank_paged("https://datasets-server.huggingface.co/rows?dataset=hotpotqa/hotpot_qa&config=distractor&split=validation" as *u8, "qab_hotpot_big" as *u8, store, 100, 3)
17
18 rf_puts("QABBIG done\n" as *u8)
19 return 0
20}