feat(perception): qualify bounded temporal stability

This commit is contained in:
DCCONSTRUCTIONS
2026-07-23 23:30:50 +03:00
parent 5a29a536a2
commit cfc7b062da
8 changed files with 1674 additions and 6 deletions
@@ -20,6 +20,7 @@ from k1link.artifacts import write_json_atomic
from k1link.compute import (
prepare_camera_compute_job,
publish_e21_lab_instance,
publish_e22_lab_instance,
publish_integrated_lab_instance,
)
from k1link.device_plugins.xgrids_k1.analyze import (
@@ -433,6 +434,69 @@ def publish_e21_lab(
)
@lab_app.command("publish-e22")
def publish_e22_lab(
result: Annotated[
Path,
typer.Option(
exists=True,
file_okay=False,
readable=True,
resolve_path=True,
help="Accepted integrated result used as the immutable E22 baseline.",
),
],
profile: Annotated[
Path,
typer.Option(
exists=True,
dir_okay=False,
readable=True,
resolve_path=True,
help="Bounded E22 temporal-stability profile.",
),
],
session_id: Annotated[
str,
typer.Option("--session-id", help="New immutable LAB session id."),
],
lab_id: Annotated[
str,
typer.Option("--lab-id", help="LAB marker, for example 'LAB E22'."),
],
display_name: Annotated[
str,
typer.Option("--display-name", help="Operator-facing saved-session title."),
],
) -> None:
"""Build and publish a bounded 2D/3D/semantic temporal-stability run."""
repository_root = Path(__file__).resolve().parents[4]
try:
published = publish_e22_lab_instance(
repository_root=repository_root,
source_result_root=result,
profile_path=profile,
lab_session_id=session_id,
lab_id=lab_id,
display_name=display_name,
)
except (OSError, SessionIntegrityError, ValueError) as exc:
console.print(f"[red]E22 LAB publication failed:[/red] {exc}")
raise typer.Exit(code=2) from exc
reductions = published.build.report["metrics"]["reductions"]
console.print(
"[green]E22 LAB instance published.[/green] "
f"session={published.binding.session_id}; "
f"source={published.binding.source_session_id}; "
f"result={published.binding.result_id}; "
f"2d_reduction={reductions['tracking_2d_acceleration_p95_fraction']:.3f}; "
f"3d_center_reduction={reductions['cuboid_center_step_p95_fraction']:.3f}; "
f"3d_yaw_reduction={reductions['cuboid_yaw_step_p95_fraction']:.3f}; "
"source_payloads_mutated=false"
)
@app.command("serve")
def serve_console(
port: Annotated[