feat: Unified Ingest SDK for DMS/ADAS promote, cuboid export and 3D fit

Replace subprocess build with promote_batch SDK, add ADAS cuboid export/fit/validate pipeline, stage normalization, and offline unit tests wired into smoke_labeling_api.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-16 09:58:35 +08:00
parent bc653d53a1
commit 0b8ade048e
42 changed files with 2074 additions and 104 deletions

View File

@@ -264,6 +264,35 @@ def resolve_approval_scope(action: str, params: dict[str, Any]) -> dict[str, Any
"batches": batches,
}
if action == "build_adas":
task = p.get("task") or "cuboid_7cls"
batch_name = p.get("batch")
root = proj_root(wf, "adas")
batches: list[dict[str, Any]] = []
if batch_name:
batches.append({"path": root / "inbox" / task / batch_name, "batch": batch_name, "location": "inbox"})
pack = p.get("pack") or "adas_moon3d_v1"
stats: dict[str, Any] = {}
if batch_name:
from as_platform.data.promote.validate.adas_cuboid import validate_adas_cuboid_batch
bpath = root / "inbox" / task / batch_name
if bpath.is_dir():
_err, _warn, stats = validate_adas_cuboid_batch(bpath, allow_partial_3d=True)
from as_platform.labeling.class_map import load_adas_class_names
names = load_adas_class_names()
class_names = {i: n for i, n in enumerate(names)}
return {
"project": "adas",
"task": task,
"pack": pack,
"scope_label": f"ADAS · {task} · {pack}" + (f" · {batch_name}" if batch_name else ""),
"class_names": class_names,
"batches": batches,
"export_stats": stats,
}
if action == "delivery_ingest":
data_path = (p.get("data_path") or "").strip()
if not data_path: