audit YOLO geometry and overlapping validation rows
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Jens
2026-08-09 19:36:15 +02:00
parent fc18e72c7f
commit 736e773fb8
13 changed files with 789 additions and 16 deletions
@@ -0,0 +1,29 @@
import json
from pathlib import Path
from scripts.evaluate_yolo_checkpoint_matrix import dataset_overlap_evidence
def test_dataset_overlap_evidence_marks_repeated_validation_rows(
tmp_path: Path,
) -> None:
dataset_yaml = tmp_path / "dataset.yaml"
dataset_yaml.write_text("path: .\nval: images/val\n", encoding="utf-8")
(tmp_path / "yolo_tile_dataset_summary.json").write_text(
json.dumps({"tile_size": 512, "stride": 256}), encoding="utf-8"
)
evidence = dataset_overlap_evidence(dataset_yaml)
assert evidence["status"] == "overlapping"
assert evidence["overlap_pixels"] == 256
assert evidence["validation_rows_independent"] is False
def test_dataset_overlap_evidence_is_explicit_when_summary_missing(
tmp_path: Path,
) -> None:
evidence = dataset_overlap_evidence(tmp_path / "dataset.yaml")
assert evidence["status"] == "unavailable"
assert evidence["validation_rows_independent"] is None