Rotate release holdouts after failed fixed test

This commit is contained in:
Jens
2026-07-27 10:48:39 +02:00
parent aa025c3d43
commit 71c13c95c7
4 changed files with 269 additions and 3 deletions
@@ -3,6 +3,8 @@ from __future__ import annotations
import importlib.util
from pathlib import Path
import pytest
SCRIPT = Path(__file__).parents[2] / "scripts" / "assess_belgium_building_training_iteration.py"
SPEC = importlib.util.spec_from_file_location("iteration_assessment", SCRIPT)
@@ -24,3 +26,12 @@ def test_calibration_selection_prefers_worst_region_then_aggregate() -> None:
def test_threshold_lookup_is_exact() -> None:
report = {"sweeps": [{"threshold": 0.25, "aggregate": {}}]}
assert MODULE.find_threshold(report, 0.25)["threshold"] == 0.25
def test_release_assessment_rejects_changed_inference_configuration() -> None:
calibration = {field: None for field in MODULE.INFERENCE_CONFIG_FIELDS}
calibration.update({"model": "/models/candidate.pt", "nms_iou": 0.3, "containment_nms": 0.95})
test = dict(calibration)
test["nms_iou"] = 0.4
with pytest.raises(ValueError, match="nms_iou"):
MODULE.assert_same_inference_config(calibration, test, "test")