evaluate models on fresh regional calibration AOIs
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 22:36:27 +02:00
parent 116b8e291e
commit b068a5e065
28 changed files with 5053 additions and 18 deletions
@@ -6,6 +6,7 @@ from scripts.evaluate_yolo_checkpoint_matrix import (
dataset_overlap_evidence,
main,
model_lineage_independence_evidence,
validate_pure_background_prefixes,
write_blocked_manifest,
)
@@ -196,3 +197,32 @@ def test_cli_blocks_lineage_validation_exposure_before_model_resolution(
payload = json.loads(output.read_text(encoding="utf-8"))
assert payload["status"] == "blocked_model_lineage_sample_exposure"
assert payload["model_loading_attempted"] is False
def test_pure_background_prefix_rejects_nonempty_labels(tmp_path: Path) -> None:
image_dir = tmp_path / "images" / "val"
label_dir = tmp_path / "labels" / "val"
image_dir.mkdir(parents=True)
label_dir.mkdir(parents=True)
image = image_dir / "sparse_bg_0001.png"
image.write_bytes(b"image")
(label_dir / "sparse_bg_0001.txt").write_text(
"0 0.5 0.5 0.1 0.1\n", encoding="utf-8"
)
import pytest
with pytest.raises(ValueError, match="non-empty labels"):
validate_pure_background_prefixes([image], ("sparse_bg",))
def test_pure_background_prefix_accepts_empty_labels(tmp_path: Path) -> None:
image_dir = tmp_path / "images" / "val"
label_dir = tmp_path / "labels" / "val"
image_dir.mkdir(parents=True)
label_dir.mkdir(parents=True)
image = image_dir / "pure_bg_0001.png"
image.write_bytes(b"image")
(label_dir / "pure_bg_0001.txt").write_text("", encoding="utf-8")
assert validate_pure_background_prefixes([image], ("pure_bg",)) == [image]