feat(lab): separate evidence catalogs and record methods
This commit is contained in:
@@ -83,6 +83,53 @@ class PublishedCameraEgoMotionLabInstance:
|
||||
build: CameraEgoMotionBuild
|
||||
|
||||
|
||||
def _laboratory_method(
|
||||
*,
|
||||
pipeline_id: str,
|
||||
execution_class: str,
|
||||
algorithm: str,
|
||||
profile_sha256: str | None,
|
||||
source_result_id: str,
|
||||
) -> dict[str, object]:
|
||||
source_identity: str | None = source_result_id.rsplit("-", 1)[-1]
|
||||
if len(source_identity) != 64 or any(
|
||||
character not in "0123456789abcdef" for character in source_identity
|
||||
):
|
||||
source_identity = None
|
||||
return {
|
||||
"schema_version": "missioncore.laboratory-method/v1",
|
||||
# E19-E26 predate the method manifest. The publisher now records the
|
||||
# exact known identities, but does not invent historical model/runtime
|
||||
# versions that were absent from their original accepted evidence.
|
||||
"completeness": "legacy-partial",
|
||||
"execution_class": execution_class,
|
||||
"pipeline_id": pipeline_id,
|
||||
"components": [
|
||||
{
|
||||
"kind": "source",
|
||||
"name": "immutable accepted upstream result",
|
||||
"version": "content-addressed",
|
||||
"role": "read-only input evidence",
|
||||
"identity_sha256": source_identity,
|
||||
},
|
||||
{
|
||||
"kind": "algorithm",
|
||||
"name": algorithm,
|
||||
"version": pipeline_id,
|
||||
"role": "laboratory derivative",
|
||||
"identity_sha256": profile_sha256,
|
||||
},
|
||||
{
|
||||
"kind": "tool",
|
||||
"name": "Mission Core LAB publisher",
|
||||
"version": "missioncore.lab-instance/v1",
|
||||
"role": "immutable catalog projection",
|
||||
"identity_sha256": _sha256(Path(__file__).resolve(strict=True)),
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
def publish_integrated_lab_instance(
|
||||
*,
|
||||
repository_root: Path,
|
||||
@@ -156,6 +203,13 @@ def publish_integrated_lab_instance(
|
||||
run_created_at_utc=source.created_at_utc,
|
||||
provenance={
|
||||
"schema_version": "missioncore.integrated-lab-publication/v1",
|
||||
"method": _laboratory_method(
|
||||
pipeline_id="integrated-perception/v1",
|
||||
execution_class="hybrid",
|
||||
algorithm="camera semantics + LiDAR metric fusion",
|
||||
profile_sha256=profile_sha256,
|
||||
source_result_id=source.result_id,
|
||||
),
|
||||
"storage_mode": "hard-linked-immutable-payloads",
|
||||
"source_job_id": source.job.job_id,
|
||||
"projected_job_id": lab_job.job_id,
|
||||
@@ -263,6 +317,13 @@ def publish_e21_lab_instance(
|
||||
include_recorded_media=False,
|
||||
provenance={
|
||||
"schema_version": "missioncore.e21-lab-publication/v1",
|
||||
"method": _laboratory_method(
|
||||
pipeline_id="realtime-envelope/v1",
|
||||
execution_class="hybrid",
|
||||
algorithm="bounded real-time perception replay",
|
||||
profile_sha256=str(e21_report["identity"]["profile_sha256"]),
|
||||
source_result_id=str(e21_document["result_id"]),
|
||||
),
|
||||
"storage_mode": "bounded-derived-replay-and-projection",
|
||||
"e21_result_id": e21_document["result_id"],
|
||||
"worker_result_id": worker_document["result_id"],
|
||||
@@ -361,6 +422,13 @@ def publish_e22_lab_instance(
|
||||
include_recorded_media=False,
|
||||
provenance={
|
||||
"schema_version": "missioncore.e22-lab-publication/v1",
|
||||
"method": _laboratory_method(
|
||||
pipeline_id="temporal-stability/v1",
|
||||
execution_class="hybrid",
|
||||
algorithm="bounded temporal 2D/3D/semantic stabilization",
|
||||
profile_sha256=build.profile_sha256,
|
||||
source_result_id=source.result_id,
|
||||
),
|
||||
"storage_mode": "bounded-derived-replay-and-temporal-projection",
|
||||
"source_result_id": source.result_id,
|
||||
"source_lab_session_id": (None if source_lab is None else source_lab.session_id),
|
||||
@@ -487,6 +555,13 @@ def publish_e23_lab_instance(
|
||||
include_recorded_media=False,
|
||||
provenance={
|
||||
"schema_version": "missioncore.e23-lab-publication/v1",
|
||||
"method": _laboratory_method(
|
||||
pipeline_id="inline-temporal-stability/v1",
|
||||
execution_class="hybrid",
|
||||
algorithm="warm-worker inline temporal stabilization",
|
||||
profile_sha256=profile_sha256,
|
||||
source_result_id=str(worker_document["result_id"]),
|
||||
),
|
||||
"storage_mode": "bounded-inline-worker-result-and-immutable-source-replay",
|
||||
"worker_result_id": worker_document["result_id"],
|
||||
"source_report_sha256": _sha256(source_path),
|
||||
@@ -589,6 +664,13 @@ def publish_e24_lab_instance(
|
||||
include_recorded_media=False,
|
||||
provenance={
|
||||
"schema_version": "missioncore.e24-lab-publication/v1",
|
||||
"method": _laboratory_method(
|
||||
pipeline_id="world-motion/v1",
|
||||
execution_class="hybrid",
|
||||
algorithm="world-frame motion tracking",
|
||||
profile_sha256=build.profile_sha256,
|
||||
source_result_id=source.result_id,
|
||||
),
|
||||
"storage_mode": "bounded-world-frame-tracking-and-immutable-source-replay",
|
||||
"source_result_id": source.result_id,
|
||||
"source_lab_session_id": (None if source_lab is None else source_lab.session_id),
|
||||
@@ -695,6 +777,13 @@ def publish_e25_lab_instance(
|
||||
include_recorded_media=False,
|
||||
provenance={
|
||||
"schema_version": "missioncore.e25-lab-publication/v1",
|
||||
"method": _laboratory_method(
|
||||
pipeline_id="persistent-support-motion/v1",
|
||||
execution_class="hybrid",
|
||||
algorithm="persistent occupied-support tracking",
|
||||
profile_sha256=build.profile_sha256,
|
||||
source_result_id=source.result_id,
|
||||
),
|
||||
"storage_mode": "bounded-persistent-support-and-immutable-source-replay",
|
||||
"source_result_id": source.result_id,
|
||||
"source_lab_session_id": (None if source_lab is None else source_lab.session_id),
|
||||
@@ -826,6 +915,13 @@ def publish_e26_lab_instance(
|
||||
include_recorded_media=False,
|
||||
provenance={
|
||||
"schema_version": "missioncore.e26-lab-publication/v1",
|
||||
"method": _laboratory_method(
|
||||
pipeline_id="camera-ego-motion-fusion/v1",
|
||||
execution_class="hybrid",
|
||||
algorithm="KB4 multiview ego-motion + persistent LiDAR support",
|
||||
profile_sha256=build.profile_sha256,
|
||||
source_result_id=lidar_source.result_id,
|
||||
),
|
||||
"storage_mode": (
|
||||
"bounded-camera-ego-motion-and-immutable-lidar-source-replay"
|
||||
),
|
||||
|
||||
@@ -1375,6 +1375,7 @@ def k1_local_surface_catalog_item(model: K1LocalSurfaceV1) -> dict[str, object]:
|
||||
"status": model.report["status"],
|
||||
"source": model.report["source"],
|
||||
"surface_model": model.report["surface_model"],
|
||||
"producer_sha256": model.identity["producer_sha256"],
|
||||
"occupancy_policy": model.report["occupancy_policy"],
|
||||
"metrics": model.report["metrics"],
|
||||
"anchors": model.report["anchors"],
|
||||
|
||||
Reference in New Issue
Block a user