Add M3-M4 baselines, C4 comparison and G2 report
Frozen feature tables for T1-T3, TF-IDF + logistic regression and DistilBERT baselines with grouped splits, T4/C4 question answering (zero-shot, few-shot, RAG, tool_only, agent), Qwen zero-shot T2, paired well-cluster bootstrap and the G2 coverage report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
27
scripts/13_m34_report.py
Executable file
27
scripts/13_m34_report.py
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Build current M3–M4 tables and a G2 coverage report from saved predictions."""
|
||||
|
||||
import fcntl
|
||||
|
||||
import pandas as pd
|
||||
|
||||
from volve_dia import m2, m34
|
||||
from volve_dia.m34_report import build_report
|
||||
|
||||
|
||||
def main():
|
||||
protocol, _ = m34.configuration()
|
||||
root, digests = m34.inputs(protocol)
|
||||
out = root / "m34"
|
||||
with (out / "report.lock").open("a") as lock:
|
||||
fcntl.flock(lock, fcntl.LOCK_EX)
|
||||
report = build_report(out, root, protocol, digests)
|
||||
for name in ("classification", "classification_contrasts", "qa", "qa_contrasts", "qa_coverage"):
|
||||
data = pd.json_normalize(report[name])
|
||||
m34.atomic_write(out / f"{name}.csv", data.to_csv(index=False).encode())
|
||||
m2.write_json(out / "report.json", report)
|
||||
print(f"G2 passed: v1 {report['g2']['passed']}, v2 {report['g2_v2']['passed']}. T4 C4 coverage: {report['c4']}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user