fix(perception): reuse M4.8 for vegetation evidence
This commit is contained in:
@@ -44,6 +44,19 @@ def test_benchmark_contract_is_bounded_and_fail_closed() -> None:
|
||||
)
|
||||
assert config["ravnoves"]["expected_frame_count"] == 4489
|
||||
assert len(config["ravnoves"]["frame_indices"]) == 12
|
||||
assert config["visual_case_contract"]["selection_basis"] == (
|
||||
"ground-truth-class-support-only"
|
||||
)
|
||||
assert config["visual_case_contract"]["case_count"] == 12
|
||||
assert sum(
|
||||
row["count"] for row in config["visual_case_contract"]["strata"]
|
||||
) == 12
|
||||
assert {row["class_name"] for row in config["visual_case_contract"]["strata"]} >= {
|
||||
"high_grass",
|
||||
"low_grass",
|
||||
"bush",
|
||||
"tree_trunk",
|
||||
}
|
||||
assert config["invariants"] == {
|
||||
"one_heavy_candidate_at_a_time": True,
|
||||
"raw_fisheye_is_immutable": True,
|
||||
@@ -68,6 +81,8 @@ def test_runner_uses_exact_visible_pairs_and_never_grants_authority() -> None:
|
||||
assert '"prewarm_inference_count": len(warmup_latencies_ms)' in source
|
||||
assert '"prewarm_latency_ms": round(warmup_latencies_ms[0], 4)' in source
|
||||
assert '"prewarm_latency_ms_last": round(warmup_latencies_ms[-1], 4)' in source
|
||||
assert "truth_focused_visuals(items, names, visual_contract)" in source
|
||||
assert 'files["vegetation_material_error"]' in source
|
||||
|
||||
|
||||
def test_worker_wrapper_is_isolated_from_canonical_triton() -> None:
|
||||
|
||||
@@ -28,7 +28,7 @@ def _worker_result(root: Path, *, candidate: str, mode: str, vegetation_iou: flo
|
||||
case_root.mkdir(parents=True)
|
||||
keys = ["source", "prediction_semantic", "policy_urban", "policy_rural", "policy_offroad"]
|
||||
if mode == "goose":
|
||||
keys.append("truth_semantic")
|
||||
keys.extend(("truth_semantic", "vegetation_material_error"))
|
||||
files = {}
|
||||
for key in keys:
|
||||
path = case_root / f"{key}.png"
|
||||
@@ -44,6 +44,13 @@ def _worker_result(root: Path, *, candidate: str, mode: str, vegetation_iou: flo
|
||||
"source_height": 600 if mode == "ravnoves" else 512,
|
||||
"center_crop_xyxy": [100, 0, 700, 600] if mode == "ravnoves" else [0, 0, 512, 512],
|
||||
"outside_crop_state": "undefined" if mode == "ravnoves" else "not-applicable",
|
||||
"focus": {
|
||||
"class_name": "high_grass",
|
||||
"label_id": 51,
|
||||
"truth_pixels": 16384,
|
||||
"truth_fraction": 0.0625,
|
||||
"stratum_rank": index + 1,
|
||||
} if mode == "goose" else None,
|
||||
"files": files,
|
||||
}
|
||||
)
|
||||
@@ -99,9 +106,12 @@ def test_vegetation_shadow_lab_seals_autonomous_visual_evidence(tmp_path: Path)
|
||||
assert manifest["ground_truth"] is False
|
||||
assert manifest["authority"]["commands_enabled"] is False
|
||||
assert manifest["authority"]["navigation_or_safety_accepted"] is False
|
||||
assert len(manifest["catalogs"]["ravnoves"]) == 12
|
||||
assert len(manifest["catalogs"]["ravnoves"]) == 0
|
||||
assert len(manifest["catalogs"]["goose"]) == 12
|
||||
assert len(manifest["artifacts"]) == 124
|
||||
assert len(manifest["artifacts"]) == 76
|
||||
assert manifest["catalogs"]["goose"][0]["focus"]["class_name"] == "high_grass"
|
||||
assert "ddrnet_error" in manifest["catalogs"]["goose"][0]["assets"]
|
||||
assert "ppliteseg_error" in manifest["catalogs"]["goose"][0]["assets"]
|
||||
assert "all_classes" not in manifest["metrics"]["candidates"]["ddrnet"]["validation_metrics"]
|
||||
assert (result_root / "result.json").stat().st_size <= 64 * 1024
|
||||
|
||||
@@ -111,7 +121,7 @@ def test_vegetation_shadow_lab_seals_autonomous_visual_evidence(tmp_path: Path)
|
||||
)
|
||||
proof = verify_laboratory_evidence_result(definition, result_root)
|
||||
assert proof["result_id"] == result_root.name
|
||||
assert proof["artifact_count"] == 124
|
||||
assert proof["artifact_count"] == 76
|
||||
|
||||
app = FastAPI()
|
||||
app.include_router(build_vegetation_shadow_lab_router(root_provider=lambda: result_root.parent))
|
||||
@@ -119,7 +129,7 @@ def test_vegetation_shadow_lab_seals_autonomous_visual_evidence(tmp_path: Path)
|
||||
response = client.get(f"/api/v1/laboratory/vegetation-shadow/{result_root.name}")
|
||||
assert response.status_code == 200
|
||||
assert response.json()["access"] == "read-only"
|
||||
asset_path = manifest["catalogs"]["ravnoves"][0]["assets"]["offroad"]["path"]
|
||||
asset_path = manifest["catalogs"]["goose"][0]["assets"]["ddrnet_error"]["path"]
|
||||
asset = client.get(
|
||||
f"/api/v1/laboratory/vegetation-shadow/{result_root.name}/assets/{asset_path}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user