fix(lab): keep full route result indexable

This commit is contained in:
DCCONSTRUCTIONS
2026-08-29 13:54:40 +03:00
parent 9dec37a8a9
commit 0a0cde7b0e
5 changed files with 189 additions and 23 deletions
@@ -7,6 +7,7 @@ import hashlib
import json
import os
import shutil
import struct
import tarfile
import tempfile
import zipfile
@@ -705,6 +706,18 @@ def seal_mixed_route_full_video_review(
temporary / "video" / "ddrnet-semantic-masks.zip",
FULL_ROUTE_FRAME_COUNT,
)
timeline_destination = temporary / "video" / "frame-source-times-ns.bin"
timeline_destination.write_bytes(
struct.pack(f"<{FULL_ROUTE_FRAME_COUNT}Q", *frame_times_ns)
)
timeline_descriptor = {
"role": "full-route-frame-timeline",
"path": "video/frame-source-times-ns.bin",
"byte_length": timeline_destination.stat().st_size,
"sha256": sha256_path(timeline_destination),
"media_type": "application/octet-stream",
}
artifacts.append(timeline_descriptor)
proof_descriptors: dict[str, dict[str, object]] = {}
for key, path in (
("base", base_root / "result.json"),
@@ -739,7 +752,13 @@ def seal_mixed_route_full_video_review(
"height": 600,
"timeline_start_seconds": job.timeline_start_seconds,
"timeline_end_seconds": job.timeline_end_seconds,
"frame_source_times_ns": frame_times_ns,
"timeline": {
"path": timeline_descriptor["path"],
"sha256": timeline_descriptor["sha256"],
"byte_length": timeline_descriptor["byte_length"],
"encoding": "uint64-le-nanoseconds",
"frame_count": FULL_ROUTE_FRAME_COUNT,
},
"ground_truth": False,
"decode_repair": {
"repaired_frame_count": 1,