feat(accuracy): build hardened phase 4 evaluation harness

This commit is contained in:
Jens
2026-08-02 02:43:41 +02:00
parent 7b92e29e49
commit bd2fd9780f
13 changed files with 5468 additions and 7 deletions
+3 -2
View File
@@ -114,8 +114,9 @@ def test_classify_proposals_consumes_reference_once() -> None:
assert [item[0] for item in miner.classify_proposals(proposals, reference, 0.25)] == ["positive", "negative"]
def test_eligible_tiles_rejects_protected_manifest_split() -> None:
manifest = {"samples": [{"sample_slug": "x", "region": "flanders", "split": "test"}]}
@pytest.mark.parametrize("protected_split", ["calibration", "test", "background-test", "challenge"])
def test_eligible_tiles_rejects_protected_manifest_split(protected_split: str) -> None:
manifest = {"samples": [{"sample_slug": "x", "region": "flanders", "split": protected_split}]}
summary = {"tiles": [{"sample_slug": "x", "split": "train", "image_path": "x.png"}]}
with pytest.raises(ValueError, match="protected"):
miner.eligible_tiles(summary, manifest, "flanders")