Download tests/test_docs.py from arthrod/contractscrub-repro: direct link, hf CLI and curl.
- Browser
- Download file 1.38 kB
-
https://huggingface.co/datasets/arthrod/contractscrub-repro/resolve/main/tests/test_docs.py
- Command line
-
hf download hf://datasets/arthrod/contractscrub-repro/tests/test_docs.py
-
curl -L -o test_docs.py https://huggingface.co/datasets/arthrod/contractscrub-repro/resolve/main/tests/test_docs.py
1.38 kB
| """The card and SCORING.md must not repeat the claims plan 10 found false.""" | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| SCORING = (ROOT / "SCORING.md").read_text() | |
| README = (ROOT / "README.md").read_text() | |
| PROMPTS = (ROOT / "scrub" / "prompts.py").read_text() | |
| RUN = (ROOT / "scrub" / "run_eval.py").read_text() | |
| def test_scoring_corrections(): | |
| for stale in ["Inconsistent Language has 13", "2,599", "has 5 gold items", "dominant failure mode", | |
| "never annotated", "never emits them"]: | |
| assert stale not in SCORING, stale | |
| for fact in ["Inconsistent Language has 87", "41 gold items", "2,678", "no Inconsistent Language row", | |
| "23 of the 44"]: | |
| assert fact in SCORING, fact | |
| def test_readme_disclaims_and_does_not_claim_reproduction(): | |
| head = "\n".join(README.splitlines()[:20]) | |
| assert "not the ContractScrub dataset" in head | |
| for stale in ["reproduces", "F1 well under 0.5", "accompanying report", "unsupported on SM86"]: | |
| assert stale not in README, stale | |
| for fact in ["0.472", "0.365", "0.642", "Known defects of the synthetic gold", "python scrub/score.py"]: | |
| assert fact in README, fact | |
| def test_no_fidelity_or_report_claims_in_code(): | |
| assert "exactly as the paper describes" not in PROMPTS | |
| assert "report" not in RUN.lower().replace("reported", "") | |