refactor(lab): move execution to Worker and manage replay and transfer lifecycles
This commit is contained in:
+72
-922
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,49 @@
|
||||
"""Operator policy and explicit management of reproducible presentation copies."""
|
||||
|
||||
from typing import Annotated
|
||||
|
||||
from fastapi import APIRouter, HTTPException, Path
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
from k1link.laboratory.local_presentations import LocalPresentationError, LocalPresentations
|
||||
|
||||
|
||||
class RetentionPolicy(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid", strict=True)
|
||||
retention_days: int = Field(ge=1, le=365)
|
||||
|
||||
|
||||
class PinCopy(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid", strict=True)
|
||||
pinned: bool
|
||||
|
||||
|
||||
CopyId = Annotated[str, Path(min_length=1, max_length=200, pattern=r"^[a-zA-Z0-9._:-]+$")]
|
||||
|
||||
|
||||
def build_local_storage_router(store: LocalPresentations) -> APIRouter:
|
||||
router = APIRouter(prefix="/api/v1/storage/laboratory", tags=["storage"])
|
||||
|
||||
def invoke(action):
|
||||
try:
|
||||
return action()
|
||||
except (LocalPresentationError, OSError, ValueError) as exc:
|
||||
raise HTTPException(409, str(exc)) from exc
|
||||
|
||||
@router.get("")
|
||||
def snapshot():
|
||||
return invoke(store.snapshot)
|
||||
|
||||
@router.put("/policy")
|
||||
def policy(value: RetentionPolicy):
|
||||
return invoke(lambda: store.policy(value.retention_days))
|
||||
|
||||
@router.put("/copies/{result_id}/pin")
|
||||
def pin(result_id: CopyId, value: PinCopy):
|
||||
return invoke(lambda: store.pin(result_id, value.pinned))
|
||||
|
||||
@router.delete("/copies/{result_id}")
|
||||
def remove(result_id: CopyId):
|
||||
return invoke(lambda: store.remove(result_id))
|
||||
|
||||
return router
|
||||
@@ -7,6 +7,7 @@ from typing import Any
|
||||
from fastapi import APIRouter, HTTPException, Query, Response
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
from k1link.laboratory.data_deletion import LabDeletionError
|
||||
from k1link.observatory.composition_runs import (
|
||||
CompositionRun,
|
||||
CompositionRunError,
|
||||
@@ -31,8 +32,10 @@ from k1link.observatory.portable_queue_binding import (
|
||||
from k1link.observatory.portable_run_definitions import PortableRunDefinitionRegistry
|
||||
from k1link.observatory.recorded_jobs import (
|
||||
ObservatoryRecordedJobQueue,
|
||||
ObservatoryRecordedQueueConflictError,
|
||||
ObservatoryRecordedQueueDuplicateError,
|
||||
ObservatoryRecordedQueueError,
|
||||
ObservatoryRecordedQueueNotFoundError,
|
||||
)
|
||||
from k1link.observatory.source_admission import PortableSourceNotPreparedError
|
||||
from k1link.sessions import SessionNotFoundError, SessionStore
|
||||
@@ -118,6 +121,7 @@ def build_modular_observatory_router(
|
||||
binding: PortableRecordedQueueBindingService | None = None,
|
||||
queue: ObservatoryRecordedJobQueue | None = None,
|
||||
view_profiles: LabViewProfileStore | None = None,
|
||||
deletion_service=None,
|
||||
) -> APIRouter:
|
||||
router = APIRouter()
|
||||
|
||||
@@ -391,6 +395,8 @@ def build_modular_observatory_router(
|
||||
except (
|
||||
CompositionRunError,
|
||||
ObservatoryRecordedQueueError,
|
||||
ObservatoryRecordedQueueNotFoundError,
|
||||
ObservatoryRecordedQueueConflictError,
|
||||
ObservatoryOntologyError,
|
||||
ValueError,
|
||||
) as exc:
|
||||
@@ -427,9 +433,31 @@ def build_modular_observatory_router(
|
||||
if composition_runs is None:
|
||||
raise HTTPException(503, "Композиции AI-слоя недоступны.")
|
||||
try:
|
||||
composition_runs.delete_projection(run_id)
|
||||
except CompositionRunError as exc:
|
||||
raise HTTPException(404, "Результат AI Inference не найден.") from exc
|
||||
if deletion_service is None:
|
||||
raise HTTPException(503, "Полное удаление LAB пока недоступно.")
|
||||
deletion_service.delete("composition", run_id)
|
||||
except (LabDeletionError, CompositionRunError) as exc:
|
||||
raise HTTPException(409, str(exc)) from exc
|
||||
return Response(status_code=204)
|
||||
|
||||
@router.delete("/api/v1/observatory/ai-runs/{job_id}", status_code=204)
|
||||
def delete_failed_run_projection(job_id: str) -> Response:
|
||||
if queue is None:
|
||||
raise HTTPException(503, "Очередь AI-слоёв недоступна.")
|
||||
try:
|
||||
if deletion_service is None:
|
||||
raise HTTPException(503, "Полное удаление LAB пока недоступно.")
|
||||
deletion_service.delete("job", job_id)
|
||||
except LabDeletionError as exc:
|
||||
raise HTTPException(409, str(exc)) from exc
|
||||
except ObservatoryRecordedQueueNotFoundError as exc:
|
||||
raise HTTPException(404, "Запуск не найден.") from exc
|
||||
except ObservatoryRecordedQueueConflictError as exc:
|
||||
raise HTTPException(
|
||||
409, "Удалить можно только завершённую ошибочную попытку без результата."
|
||||
) from exc
|
||||
except ValueError as exc:
|
||||
raise HTTPException(422, "Некорректный идентификатор запуска.") from exc
|
||||
return Response(status_code=204)
|
||||
|
||||
@router.get("/api/v1/observatory/ai-runs")
|
||||
@@ -449,7 +477,8 @@ def build_modular_observatory_router(
|
||||
for job in queue.list_jobs(
|
||||
source_session_id=source_session_id,
|
||||
setup_id=setup_id,
|
||||
limit=20,
|
||||
limit=500,
|
||||
include_hidden=False,
|
||||
)
|
||||
]
|
||||
except (ObservatoryRecordedQueueError, ValueError) as exc:
|
||||
@@ -457,7 +486,7 @@ def build_modular_observatory_router(
|
||||
jobs.sort(key=lambda job: job.created_at_utc, reverse=True)
|
||||
return {
|
||||
"schema_version": "missioncore.observatory-recorded-job-list/v1",
|
||||
"items": [job.as_dict() for job in jobs[:20]],
|
||||
"items": [job.as_dict() for job in jobs],
|
||||
"authority": {
|
||||
"commands_enabled": False,
|
||||
"actuation_allowed": False,
|
||||
|
||||
@@ -7,6 +7,7 @@ from fastapi import Path as ApiPath
|
||||
from fastapi.responses import JSONResponse
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
from k1link.laboratory.data_deletion import LabDeletionError
|
||||
from k1link.observatory import (
|
||||
LaboratorySetupRegistry,
|
||||
ObservatoryRunPreparationCapacityError,
|
||||
@@ -173,6 +174,7 @@ def build_observatory_router(
|
||||
portable_setup_projector: PortableSetupProjector | PortableLabV1SetupProjector | None = None,
|
||||
portable_setup_projector_error: str | None = None,
|
||||
portable_binding_service: PortableRecordedQueueBindingService | None = None,
|
||||
deletion_service=None,
|
||||
portable_result_view: PortableResultViewService | None = None,
|
||||
portable_artifact_transport: PortableObservatoryArtifactTransport | None = None,
|
||||
portable_result_publisher: PortableObservatoryResultPublisher | None = None,
|
||||
@@ -1139,6 +1141,7 @@ def build_observatory_router(
|
||||
setup_id=setup_id,
|
||||
definition_sha256=definition_sha256,
|
||||
limit=limit,
|
||||
include_hidden=False,
|
||||
)
|
||||
except (ObservatoryRecordedQueueError, ValueError) as exc:
|
||||
raise HTTPException(
|
||||
@@ -1329,7 +1332,12 @@ def build_observatory_router(
|
||||
)
|
||||
def delete_observatory_lab_projection(session_id: str) -> Response:
|
||||
try:
|
||||
store.delete_capability_lab_projection(session_id)
|
||||
if deletion_service is None:
|
||||
store.validate_lab_projection(session_id)
|
||||
raise HTTPException(503, "Полное удаление LAB пока недоступно.")
|
||||
deletion_service.delete("lab", session_id)
|
||||
except LabDeletionError as exc:
|
||||
raise HTTPException(409, str(exc)) from exc
|
||||
except SessionNotFoundError as exc:
|
||||
raise HTTPException(
|
||||
status_code=404,
|
||||
|
||||
@@ -52,6 +52,8 @@ from k1link.observatory.recorded_jobs import (
|
||||
RecordedExecutorIdentity,
|
||||
)
|
||||
from k1link.observatory.recorded_progress import RecordedProgress
|
||||
from k1link.observatory.transfer_space import TransferCapacityError
|
||||
from k1link.web.source_transfer_response import SourceTransferFileResponse
|
||||
|
||||
OBSERVATORY_WORKER_CAPABILITY_CLAIM_REQUEST_SCHEMA: Final = (
|
||||
"missioncore.observatory-worker-claim-request/v2"
|
||||
@@ -67,9 +69,7 @@ OBSERVATORY_WORKER_SUCCEED_REQUEST_SCHEMA: Final = (
|
||||
OBSERVATORY_WORKER_FAIL_REQUEST_SCHEMA: Final = "missioncore.observatory-worker-fail-request/v1"
|
||||
OBSERVATORY_WORKER_CONTOUR_HEADER: Final = "X-Mission-Core-Contour-Id"
|
||||
OBSERVATORY_WORKER_CLAIM_TOKEN_HEADER: Final = "X-Mission-Core-Claim-Token"
|
||||
OBSERVATORY_WORKER_CLAIM_GENERATION_HEADER: Final = (
|
||||
"X-Mission-Core-Claim-Generation"
|
||||
)
|
||||
OBSERVATORY_WORKER_CLAIM_GENERATION_HEADER: Final = "X-Mission-Core-Claim-Generation"
|
||||
|
||||
_IDENTIFIER = re.compile(r"^[a-z][a-z0-9-]{2,95}$")
|
||||
_SHA256 = re.compile(r"^[a-f0-9]{64}$")
|
||||
@@ -175,8 +175,7 @@ class ObservatoryWorkerClaimRequest(_StrictWorkerRequest):
|
||||
@model_validator(mode="after")
|
||||
def validate_capability_snapshot(self) -> ObservatoryWorkerClaimRequest:
|
||||
identities = tuple(
|
||||
capability.recorded_identity()
|
||||
for capability in self.supported_executor_identities
|
||||
capability.recorded_identity() for capability in self.supported_executor_identities
|
||||
)
|
||||
if len(identities) != len(set(identities)):
|
||||
raise ValueError("executor capabilities must be unique")
|
||||
@@ -306,11 +305,14 @@ def build_observatory_worker_router(
|
||||
)
|
||||
)
|
||||
if claim is None:
|
||||
return Response(status_code=204, headers={
|
||||
"X-Mission-Core-Idle-Claim": (
|
||||
"non-binding" if request.schema_version.endswith("/v3") else "durable"
|
||||
),
|
||||
})
|
||||
return Response(
|
||||
status_code=204,
|
||||
headers={
|
||||
"X-Mission-Core-Idle-Claim": (
|
||||
"non-binding" if request.schema_version.endswith("/v3") else "durable"
|
||||
),
|
||||
},
|
||||
)
|
||||
return claim.as_dict()
|
||||
|
||||
@router.get("/recorded-jobs/{job_id}")
|
||||
@@ -345,10 +347,14 @@ def build_observatory_worker_router(
|
||||
request: ObservatoryWorkerProgressRequest,
|
||||
job_id: Annotated[str, ApiPath(pattern=_JOB_ID_PATTERN)],
|
||||
) -> Response:
|
||||
_queue_call(lambda: queue.report_progress(
|
||||
job_id, claim_token=request.claim_token,
|
||||
claimant_id=authentication.contour_id, progress=request.progress,
|
||||
))
|
||||
_queue_call(
|
||||
lambda: queue.report_progress(
|
||||
job_id,
|
||||
claim_token=request.claim_token,
|
||||
claimant_id=authentication.contour_id,
|
||||
progress=request.progress,
|
||||
)
|
||||
)
|
||||
return Response(status_code=204)
|
||||
|
||||
@router.post("/recorded-jobs/{job_id}/checkpoint")
|
||||
@@ -434,9 +440,7 @@ def build_observatory_worker_router(
|
||||
status_code=409,
|
||||
detail="Recorded result is not awaiting publication.",
|
||||
)
|
||||
package_root = _artifact_call(
|
||||
lambda: artifact_transport.package_root_for_terminal(job)
|
||||
)
|
||||
package_root = _artifact_call(lambda: artifact_transport.package_root_for_terminal(job))
|
||||
try:
|
||||
result_publisher.publish(job=job, package_root=package_root)
|
||||
except PortableResultPublisherError as exc:
|
||||
@@ -487,8 +491,7 @@ def build_observatory_worker_router(
|
||||
claim_token=claim_token,
|
||||
claim_generation=claim_generation,
|
||||
claimant_id=authentication.contour_id,
|
||||
)
|
||||
.as_dict()
|
||||
).as_dict()
|
||||
)
|
||||
|
||||
@router.get("/recorded-jobs/{job_id}/source-camera-epoch-archive")
|
||||
@@ -506,25 +509,32 @@ def build_observatory_worker_router(
|
||||
Header(alias=OBSERVATORY_WORKER_CLAIM_GENERATION_HEADER, ge=1),
|
||||
],
|
||||
) -> FileResponse:
|
||||
archive, path = _artifact_call(
|
||||
lambda: artifact_transport.materialize_camera_epoch_archive(
|
||||
job_id=job_id,
|
||||
claim_token=claim_token,
|
||||
claim_generation=claim_generation,
|
||||
claimant_id=authentication.contour_id,
|
||||
lease_fd = artifact_transport.source_lifecycle.acquire_reader()
|
||||
try:
|
||||
archive, path = _artifact_call(
|
||||
lambda: artifact_transport.materialize_camera_epoch_archive(
|
||||
job_id=job_id,
|
||||
claim_token=claim_token,
|
||||
claim_generation=claim_generation,
|
||||
claimant_id=authentication.contour_id,
|
||||
)
|
||||
)
|
||||
)
|
||||
return FileResponse(
|
||||
path,
|
||||
media_type=PORTABLE_CAMERA_EPOCH_ARCHIVE_MEDIA_TYPE,
|
||||
headers={
|
||||
"ETag": f'"{archive.sha256}"',
|
||||
"Cache-Control": "private, no-store",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Mission-Core-Content-Sha256": archive.sha256,
|
||||
PORTABLE_CAMERA_EPOCH_ARCHIVE_ID_HEADER: archive.archive_id,
|
||||
},
|
||||
)
|
||||
response = SourceTransferFileResponse(
|
||||
path,
|
||||
media_type=PORTABLE_CAMERA_EPOCH_ARCHIVE_MEDIA_TYPE,
|
||||
headers={
|
||||
"ETag": f'"{archive.sha256}"',
|
||||
"Cache-Control": "private, no-store",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Mission-Core-Content-Sha256": archive.sha256,
|
||||
PORTABLE_CAMERA_EPOCH_ARCHIVE_ID_HEADER: archive.archive_id,
|
||||
},
|
||||
)
|
||||
response.lease_fd = lease_fd
|
||||
return response
|
||||
except BaseException:
|
||||
os.close(lease_fd)
|
||||
raise
|
||||
|
||||
@router.get("/recorded-jobs/{job_id}/source-members/{member_id}")
|
||||
def source_member(
|
||||
@@ -542,29 +552,34 @@ def build_observatory_worker_router(
|
||||
Header(alias=OBSERVATORY_WORKER_CLAIM_GENERATION_HEADER, ge=1),
|
||||
],
|
||||
) -> FileResponse:
|
||||
member, path = _artifact_call(
|
||||
lambda: artifact_transport.materialize_source_member(
|
||||
job_id=job_id,
|
||||
member_id=member_id,
|
||||
claim_token=claim_token,
|
||||
claim_generation=claim_generation,
|
||||
claimant_id=authentication.contour_id,
|
||||
lease_fd = artifact_transport.source_lifecycle.acquire_reader()
|
||||
try:
|
||||
member, path = _artifact_call(
|
||||
lambda: artifact_transport.materialize_source_member(
|
||||
job_id=job_id,
|
||||
member_id=member_id,
|
||||
claim_token=claim_token,
|
||||
claim_generation=claim_generation,
|
||||
claimant_id=authentication.contour_id,
|
||||
)
|
||||
)
|
||||
)
|
||||
return FileResponse(
|
||||
path,
|
||||
media_type=member.media_type,
|
||||
headers={
|
||||
"ETag": f'"{member.sha256}"',
|
||||
"Cache-Control": "private, no-store",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Mission-Core-Content-Sha256": member.sha256,
|
||||
},
|
||||
)
|
||||
response = SourceTransferFileResponse(
|
||||
path,
|
||||
media_type=member.media_type,
|
||||
headers={
|
||||
"ETag": f'"{member.sha256}"',
|
||||
"Cache-Control": "private, no-store",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Mission-Core-Content-Sha256": member.sha256,
|
||||
},
|
||||
)
|
||||
response.lease_fd = lease_fd
|
||||
return response
|
||||
except BaseException:
|
||||
os.close(lease_fd)
|
||||
raise
|
||||
|
||||
@router.put(
|
||||
"/recorded-jobs/{job_id}/result-packages/{result_sha256}/manifest"
|
||||
)
|
||||
@router.put("/recorded-jobs/{job_id}/result-packages/{result_sha256}/manifest")
|
||||
async def stage_result_manifest(
|
||||
request: Request,
|
||||
job_id: Annotated[str, ApiPath(pattern=_JOB_ID_PATTERN)],
|
||||
@@ -590,13 +605,10 @@ def build_observatory_worker_router(
|
||||
claim_token=claim_token,
|
||||
claim_generation=claim_generation,
|
||||
claimant_id=authentication.contour_id,
|
||||
)
|
||||
.as_dict()
|
||||
).as_dict()
|
||||
)
|
||||
|
||||
@router.put(
|
||||
"/recorded-jobs/{job_id}/result-packages/{result_sha256}/members/{member_id}"
|
||||
)
|
||||
@router.put("/recorded-jobs/{job_id}/result-packages/{result_sha256}/members/{member_id}")
|
||||
async def upload_result_member(
|
||||
request: Request,
|
||||
job_id: Annotated[str, ApiPath(pattern=_JOB_ID_PATTERN)],
|
||||
@@ -628,9 +640,7 @@ def build_observatory_worker_router(
|
||||
_raise_artifact_or_queue_error(exc)
|
||||
return plan.as_dict()
|
||||
|
||||
@router.post(
|
||||
"/recorded-jobs/{job_id}/result-packages/{result_sha256}/complete"
|
||||
)
|
||||
@router.post("/recorded-jobs/{job_id}/result-packages/{result_sha256}/complete")
|
||||
def complete_result_package(
|
||||
job_id: Annotated[str, ApiPath(pattern=_JOB_ID_PATTERN)],
|
||||
result_sha256: Annotated[str, ApiPath(pattern=r"^[a-f0-9]{64}$")],
|
||||
@@ -653,8 +663,7 @@ def build_observatory_worker_router(
|
||||
claim_token=claim_token,
|
||||
claim_generation=claim_generation,
|
||||
claimant_id=authentication.contour_id,
|
||||
)
|
||||
.as_dict()
|
||||
).as_dict()
|
||||
)
|
||||
|
||||
return router
|
||||
@@ -717,6 +726,10 @@ def _queue_call[T](operation: Callable[[], T]) -> T:
|
||||
def _artifact_call[T](operation: Callable[[], T]) -> T:
|
||||
try:
|
||||
return _queue_call(operation)
|
||||
except TransferCapacityError as exc:
|
||||
raise HTTPException(
|
||||
status_code=503, detail=str(exc), headers={"Retry-After": "30"}
|
||||
) from exc
|
||||
except PortableArtifactTransportIntegrityError as exc:
|
||||
raise HTTPException(
|
||||
status_code=409,
|
||||
@@ -735,6 +748,10 @@ def _artifact_call[T](operation: Callable[[], T]) -> T:
|
||||
|
||||
|
||||
def _raise_artifact_or_queue_error(exc: Exception) -> None:
|
||||
if isinstance(exc, TransferCapacityError):
|
||||
raise HTTPException(
|
||||
status_code=503, detail=str(exc), headers={"Retry-After": "30"}
|
||||
) from exc
|
||||
if isinstance(exc, PortableArtifactTransportIntegrityError):
|
||||
raise HTTPException(
|
||||
status_code=409,
|
||||
|
||||
@@ -9,6 +9,7 @@ from fastapi import APIRouter, HTTPException, Path, Query, Response
|
||||
from fastapi.responses import FileResponse
|
||||
|
||||
from k1link.laboratory.canonical_rerun_overlay import CanonicalLabOverlayError
|
||||
from k1link.laboratory.local_presentations import LOCK as PRESENTATION_LOCK
|
||||
from k1link.observatory.composition_runs import CompositionRunError, CompositionRunStore
|
||||
from k1link.observatory.portable_replay import PortableReplayService
|
||||
from k1link.observatory.portable_result_view import PortableResultViewError
|
||||
@@ -39,6 +40,42 @@ def build_portable_replay_router(
|
||||
router = APIRouter(tags=["observatory"])
|
||||
path = "/api/v1/observatory/portable-results/{result_id}/replays/{base_sha}/recording.rrd"
|
||||
|
||||
class LeasedReplayResponse(FileResponse):
|
||||
def __init__(self, artifact, result_id):
|
||||
self.copy_id = result_id
|
||||
self.copies = getattr(service, "local_copies", None)
|
||||
super().__init__(
|
||||
artifact.path,
|
||||
media_type="application/vnd.rerun.rrd",
|
||||
headers={
|
||||
"ETag": f'"{artifact.sha256}"',
|
||||
"X-Rerun-Format": "RRF2",
|
||||
"Cache-Control": "private, max-age=31536000, immutable",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
},
|
||||
)
|
||||
if self.copies is not None:
|
||||
self.copies.acquire(result_id)
|
||||
|
||||
async def __call__(self, scope, receive, send):
|
||||
try:
|
||||
await super().__call__(scope, receive, send)
|
||||
finally:
|
||||
if self.copies is not None:
|
||||
self.copies.release(self.copy_id)
|
||||
|
||||
def read_copy(copy_id, generation, getter):
|
||||
with PRESENTATION_LOCK:
|
||||
try:
|
||||
artifact = getter()
|
||||
except (ValueError, OSError, KeyError, TypeError, PortableResultViewError) as exc:
|
||||
raise HTTPException(409, "Кэш результата не прошёл проверку.") from exc
|
||||
if artifact is None:
|
||||
raise HTTPException(409, "Сохранённый просмотр ещё не подготовлен.")
|
||||
if artifact.sha256 != generation:
|
||||
raise HTTPException(412, "Версия сохранённого просмотра изменилась.")
|
||||
return LeasedReplayResponse(artifact, copy_id)
|
||||
|
||||
@router.head(path)
|
||||
def prepare(result_id: ResultId, base_sha: BaseSha) -> Response:
|
||||
try:
|
||||
@@ -71,24 +108,7 @@ def build_portable_replay_router(
|
||||
base_sha: BaseSha,
|
||||
generation: Annotated[str, Query(pattern=r"^[a-f0-9]{64}$")],
|
||||
) -> FileResponse:
|
||||
try:
|
||||
artifact = service.cached(result_id, base_sha)
|
||||
except (ValueError, OSError, KeyError, TypeError, PortableResultViewError) as exc:
|
||||
raise HTTPException(409, "Кэш результата не прошёл проверку.") from exc
|
||||
if artifact is None:
|
||||
raise HTTPException(409, "Сохранённый просмотр ещё не подготовлен.")
|
||||
if artifact.sha256 != generation:
|
||||
raise HTTPException(412, "Версия сохранённого просмотра изменилась.")
|
||||
return FileResponse(
|
||||
artifact.path,
|
||||
media_type="application/vnd.rerun.rrd",
|
||||
headers={
|
||||
"ETag": f'"{artifact.sha256}"',
|
||||
"X-Rerun-Format": "RRF2",
|
||||
"Cache-Control": "private, max-age=31536000, immutable",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
},
|
||||
)
|
||||
return read_copy(result_id, generation, lambda: service.cached(result_id, base_sha))
|
||||
|
||||
composition_path = (
|
||||
"/api/v1/observatory/ai-composition-runs/{run_id}/replays/{base_sha}/recording.rrd"
|
||||
@@ -146,29 +166,10 @@ def build_portable_replay_router(
|
||||
base_sha: BaseSha,
|
||||
generation: Annotated[str, Query(pattern=r"^[a-f0-9]{64}$")],
|
||||
) -> FileResponse:
|
||||
try:
|
||||
artifact = service.cached_composition(run_id, composition_members(run_id), base_sha)
|
||||
except (
|
||||
ValueError,
|
||||
OSError,
|
||||
KeyError,
|
||||
TypeError,
|
||||
PortableResultViewError,
|
||||
) as exc:
|
||||
raise HTTPException(409, "Кэш составного результата не прошёл проверку.") from exc
|
||||
if artifact is None:
|
||||
raise HTTPException(409, "Составной просмотр ещё не подготовлен.")
|
||||
if artifact.sha256 != generation:
|
||||
raise HTTPException(412, "Версия составного просмотра изменилась.")
|
||||
return FileResponse(
|
||||
artifact.path,
|
||||
media_type="application/vnd.rerun.rrd",
|
||||
headers={
|
||||
"ETag": f'"{artifact.sha256}"',
|
||||
"X-Rerun-Format": "RRF2",
|
||||
"Cache-Control": "private, max-age=31536000, immutable",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
},
|
||||
return read_copy(
|
||||
run_id,
|
||||
generation,
|
||||
lambda: service.cached_composition(run_id, composition_members(run_id), base_sha),
|
||||
)
|
||||
|
||||
return router
|
||||
|
||||
@@ -21,6 +21,7 @@ from k1link.compute import (
|
||||
RecordedPerceptionOverlayError,
|
||||
RecordedPerceptionVideo,
|
||||
)
|
||||
from k1link.laboratory.worker_gateway import LaboratoryWorkerGateway
|
||||
from k1link.sessions import (
|
||||
LayoutConflictError,
|
||||
MaterializedRecording,
|
||||
@@ -398,6 +399,7 @@ def build_session_router(
|
||||
media_inspector: RecordedMediaInspector | None = None,
|
||||
perception_overlay_provider: RecordedPerceptionOverlayProvider | None = None,
|
||||
perception_media_provider: RecordedPerceptionMediaProvider | None = None,
|
||||
laboratory_gateway: LaboratoryWorkerGateway | None = None,
|
||||
point_color_renderers: Mapping[str, RecordedPointColorRenderer] | None = None,
|
||||
point_display_renderers: Mapping[str, RecordedPointDisplayRenderer] | None = None,
|
||||
lab_calculation_profile_resolver: (
|
||||
@@ -411,6 +413,38 @@ def build_session_router(
|
||||
router = APIRouter(tags=["observation-sessions"])
|
||||
recorded_media_inspector = media_inspector or RecordedMediaInspector()
|
||||
|
||||
def perception_route(path: str, *, methods=None):
|
||||
"""Bind Core to Worker while retaining the existing presentation contracts."""
|
||||
def decorate(handler):
|
||||
if laboratory_gateway is None:
|
||||
return router.api_route(path, methods=methods or ["GET"])(handler)
|
||||
|
||||
async def forward(request: Request, session_id: str):
|
||||
try:
|
||||
command = await run_in_threadpool(
|
||||
_prepare_replay, store, catalog_refresher,
|
||||
session_id, 1.0, False, False,
|
||||
)
|
||||
if request.method == "POST" and command.map_version is not None:
|
||||
raise HTTPException(
|
||||
409, "Слой распознавания относится к исходной геометрии записи.")
|
||||
except SessionNotFoundError as exc:
|
||||
raise HTTPException(404, str(exc)) from exc
|
||||
except (SessionNotReplayableError, SessionIntegrityError) as exc:
|
||||
raise HTTPException(409, str(exc)) from exc
|
||||
except ValueError as exc:
|
||||
raise HTTPException(422, "Некорректный идентификатор сессии.") from exc
|
||||
suffix = path.split("/{session_id}/", 1)[1]
|
||||
for key, value in request.path_params.items():
|
||||
suffix = suffix.replace("{" + key + "}", str(value))
|
||||
return await laboratory_gateway.forward(
|
||||
request, "presentation/sessions/" + session_id + "/" + suffix)
|
||||
|
||||
forward.__name__ = handler.__name__ + "_worker"
|
||||
router.add_api_route(path, forward, methods=methods or ["GET"])
|
||||
return handler
|
||||
return decorate
|
||||
|
||||
@router.get("/api/v1/observation-sessions/{session_id}/display-profile")
|
||||
def get_session_display_profile(session_id: str):
|
||||
from k1link.sessions.display_profile import load_display_profile
|
||||
@@ -540,7 +574,9 @@ def build_session_router(
|
||||
)
|
||||
async def delete_observation_session(session_id: str) -> Response:
|
||||
try:
|
||||
store.get_session(session_id)
|
||||
detail = store.get_session(session_id)
|
||||
if detail.summary.lab is not None:
|
||||
raise HTTPException(409, "Удалите LAB через её историю запусков.")
|
||||
recorded_artifacts = store.list_recorded_media(session_id)
|
||||
except SessionNotFoundError:
|
||||
# DELETE is idempotent. Multiple mounted catalogs or another
|
||||
@@ -1205,7 +1241,7 @@ def build_session_router(
|
||||
},
|
||||
)
|
||||
|
||||
@router.post("/api/v1/observation-sessions/{session_id}/perception.rrd")
|
||||
@perception_route("/api/v1/observation-sessions/{session_id}/perception.rrd", methods=["POST"])
|
||||
async def get_observation_session_perception(
|
||||
session_id: str,
|
||||
request: RecordedPerceptionRequest,
|
||||
@@ -1284,7 +1320,7 @@ def build_session_router(
|
||||
},
|
||||
)
|
||||
|
||||
@router.get("/api/v1/observation-sessions/{session_id}/perception/status")
|
||||
@perception_route("/api/v1/observation-sessions/{session_id}/perception/status")
|
||||
async def get_observation_session_perception_status(
|
||||
session_id: str,
|
||||
response: Response,
|
||||
@@ -1458,7 +1494,7 @@ def build_session_router(
|
||||
return StreamingResponse(chunks(), media_type="application/vnd.nodedc.point-display-stream",
|
||||
headers={"Cache-Control": "no-store, no-transform"})
|
||||
|
||||
@router.get("/api/v1/observation-sessions/{session_id}/perception-media/{result_id}/manifest")
|
||||
@perception_route("/api/v1/observation-sessions/{session_id}/perception-media/{result_id}/manifest")
|
||||
def get_recorded_perception_media_manifest(
|
||||
session_id: str,
|
||||
result_id: str,
|
||||
@@ -1482,7 +1518,7 @@ def build_session_router(
|
||||
},
|
||||
)
|
||||
|
||||
@router.api_route(
|
||||
@perception_route(
|
||||
"/api/v1/observation-sessions/{session_id}/perception-media/{result_id}/recording.mp4",
|
||||
methods=["GET", "HEAD"],
|
||||
)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
"""Keep source-copy readers alive through streaming, ranges and disconnects."""
|
||||
|
||||
import os
|
||||
|
||||
from starlette.responses import FileResponse
|
||||
from starlette.types import Receive, Scope, Send
|
||||
|
||||
|
||||
class SourceTransferFileResponse(FileResponse):
|
||||
lease_fd: int
|
||||
|
||||
async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
|
||||
# The response owns the read. Do not delegate pathsend to a server which
|
||||
# could open the pathname after this coroutine has released its lease.
|
||||
extensions = dict(scope.get("extensions", {}))
|
||||
extensions.pop("http.response.pathsend", None)
|
||||
scope = {**scope, "extensions": extensions}
|
||||
try:
|
||||
await super().__call__(scope, receive, send)
|
||||
finally:
|
||||
os.close(self.lease_fd)
|
||||
@@ -0,0 +1,129 @@
|
||||
"""Full recorded perception playback prepared exclusively in the Worker volume."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Annotated
|
||||
|
||||
from fastapi import APIRouter, Header, HTTPException, Query, Request
|
||||
from fastapi.responses import FileResponse, JSONResponse, Response
|
||||
|
||||
from k1link.compute import (
|
||||
IntegratedPerceptionOverlayStore,
|
||||
RecordedCalibratedFusionStore,
|
||||
RecordedPerceptionEpochStore,
|
||||
RecordedPerceptionOverlayMux,
|
||||
RecordedPerceptionOverlayStore,
|
||||
)
|
||||
from k1link.compute.results import RecordedPerceptionOverlayArtifact
|
||||
from k1link.web.session_api import (
|
||||
RecordedPerceptionPreparationStatus,
|
||||
RecordedPerceptionRequest,
|
||||
_recorded_perception_manifest_document,
|
||||
_recorded_perception_video_response,
|
||||
_require_matching_digest,
|
||||
)
|
||||
|
||||
|
||||
def build_worker_laboratory_presentation(root: Path, ffmpeg: Path) -> APIRouter:
|
||||
router = APIRouter(prefix="/api/v1/laboratory/presentation/sessions")
|
||||
jobs = root / ".runtime/compute-jobs"
|
||||
results = root / ".runtime/compute-results"
|
||||
cache = root / "presentation"
|
||||
legacy = RecordedPerceptionOverlayStore(
|
||||
jobs_root=jobs,
|
||||
results_root=results,
|
||||
cache_root=cache / "perception-overlays",
|
||||
ffmpeg_path=ffmpeg,
|
||||
ffprobe_path=ffmpeg.with_name("ffprobe"),
|
||||
)
|
||||
fusion = RecordedCalibratedFusionStore(
|
||||
jobs_root=jobs,
|
||||
perception_results_root=results,
|
||||
fusion_results_root=root / ".runtime/compute-fusions",
|
||||
cache_root=cache / "calibrated-fusion-overlays",
|
||||
)
|
||||
integrated = IntegratedPerceptionOverlayStore(
|
||||
jobs_root=jobs,
|
||||
results_root=root / ".runtime/compute-experiments/e10/worker-results",
|
||||
lidar_packs_root=root / ".runtime/compute-experiments/e10/lidar-packs",
|
||||
cache_root=cache / "integrated-perception-overlays",
|
||||
ffmpeg_path=ffmpeg,
|
||||
)
|
||||
overlay = RecordedPerceptionOverlayMux(integrated, RecordedPerceptionOverlayMux(fusion, legacy))
|
||||
media = RecordedPerceptionEpochStore(
|
||||
jobs_root=jobs,
|
||||
results_root=results,
|
||||
ffprobe_path=ffmpeg.with_name("ffprobe"),
|
||||
)
|
||||
|
||||
@router.post("/{session_id}/perception.rrd")
|
||||
def recording(session_id: str, request: RecordedPerceptionRequest):
|
||||
artifact = overlay.materialize(session_id, **request.model_dump())
|
||||
if artifact is None:
|
||||
return Response(status_code=204, headers={"Cache-Control": "no-store"})
|
||||
if isinstance(artifact, RecordedPerceptionOverlayArtifact):
|
||||
return FileResponse(
|
||||
artifact.path,
|
||||
media_type="application/vnd.rerun.rrd",
|
||||
filename="perception.rrd",
|
||||
content_disposition_type="inline",
|
||||
headers={
|
||||
"ETag": f'"sha256:{artifact.sha256}"',
|
||||
"Cache-Control": "private, no-cache, no-transform",
|
||||
},
|
||||
)
|
||||
return Response(
|
||||
artifact,
|
||||
media_type="application/vnd.rerun.rrd",
|
||||
headers={"Cache-Control": "private, no-cache, no-transform"},
|
||||
)
|
||||
|
||||
@router.get("/{session_id}/perception/status")
|
||||
def status(
|
||||
session_id: str,
|
||||
recording_id: Annotated[
|
||||
str, Query(min_length=1, max_length=128, pattern=r"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$")
|
||||
],
|
||||
):
|
||||
request = RecordedPerceptionRequest(
|
||||
application_id="nodedc_mission_core_recorded", recording_id=recording_id
|
||||
)
|
||||
return RecordedPerceptionPreparationStatus.model_validate(
|
||||
overlay.status(session_id, recording_id=request.recording_id)
|
||||
)
|
||||
|
||||
def video(session: str, result: str):
|
||||
value = media.video(session, result)
|
||||
if value is None:
|
||||
raise HTTPException(404, "Готовое видео сегментации отсутствует.")
|
||||
return value
|
||||
|
||||
@router.get("/{session_id}/perception-media/{result_id}/manifest")
|
||||
def manifest(session_id: str, result_id: str, if_match: str | None = Header(None)):
|
||||
value = video(session_id, result_id)
|
||||
etag = f'"sha256:{value.sha256}"'
|
||||
_require_matching_digest(etag, if_match)
|
||||
return JSONResponse(
|
||||
_recorded_perception_manifest_document(value),
|
||||
headers={"ETag": etag, "Cache-Control": "private, no-cache"},
|
||||
)
|
||||
|
||||
@router.api_route(
|
||||
"/{session_id}/perception-media/{result_id}/recording.mp4", methods=["GET", "HEAD"]
|
||||
)
|
||||
def movie(
|
||||
request: Request,
|
||||
session_id: str,
|
||||
result_id: str,
|
||||
generation: str,
|
||||
range_header: str | None = Header(None, alias="Range"),
|
||||
):
|
||||
value = video(session_id, result_id)
|
||||
if generation != value.sha256:
|
||||
raise HTTPException(412, "Поколение видео сегментации было заменено.")
|
||||
return _recorded_perception_video_response(
|
||||
value, range_header, head_only=request.method == "HEAD"
|
||||
)
|
||||
|
||||
return router
|
||||
@@ -0,0 +1,890 @@
|
||||
"""Worker-owned legacy LAB presentation and evaluation surface.
|
||||
|
||||
Existing evidence validators and projections are reused unchanged. Only the
|
||||
Worker composes this filesystem-backed surface; the operator uses its transport.
|
||||
The legacy runtime layout is a compatibility binding inside a managed volume,
|
||||
not an operator checkout or a reason to copy compute inputs to the operator.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable
|
||||
from pathlib import Path
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
from k1link.laboratory import (
|
||||
LaboratoryEvidenceRegistry,
|
||||
LaboratoryEvidenceReportService,
|
||||
LaboratoryRunner,
|
||||
LaboratoryValueReviewRegistry,
|
||||
)
|
||||
from k1link.laboratory.m48_raw_evidence import (
|
||||
M48_EXPECTED_THREAT_RESULT_ID,
|
||||
M48RawEvidenceError,
|
||||
M48RawEvidenceReader,
|
||||
)
|
||||
from k1link.sessions import RecordedCameraFrame
|
||||
from k1link.web.advanced_laboratory_api import build_advanced_laboratory_router
|
||||
from k1link.web.e30_engineering_api import build_e30_engineering_router
|
||||
from k1link.web.e30_human_review_api import build_e30_human_review_router
|
||||
from k1link.web.e30_review_api import build_e30_review_router
|
||||
from k1link.web.e40_case_review_api import build_e40_case_review_router
|
||||
from k1link.web.e46_blind_review_api import build_e46_blind_review_router
|
||||
from k1link.web.e46a_ai_engineering_preannotation_api import (
|
||||
build_e46a_ai_engineering_preannotation_router,
|
||||
)
|
||||
from k1link.web.e46b_temporal_motion_api import build_e46b_temporal_motion_router
|
||||
from k1link.web.e46c_full_replay_world_tracks_api import build_e46c_full_replay_world_tracks_router
|
||||
from k1link.web.e46d_temporal_failure_audit_api import build_e46d_temporal_failure_audit_router
|
||||
from k1link.web.e46e_ready_stack_api import build_e46e_ready_stack_router
|
||||
from k1link.web.e46f_dashcam_bakeoff_api import build_e46f_dashcam_bakeoff_router
|
||||
from k1link.web.e46g_rectified_detector_bakeoff_api import (
|
||||
build_e46g_rectified_detector_bakeoff_router,
|
||||
)
|
||||
from k1link.web.e46h_full_rectified_front_replay_api import (
|
||||
build_e46h_full_rectified_front_replay_router,
|
||||
)
|
||||
from k1link.web.e46i_grounding_dino_full_replay_api import (
|
||||
build_e46i_grounding_dino_full_replay_router,
|
||||
)
|
||||
from k1link.web.e46j_raw_fisheye_realtime_api import build_e46j_raw_fisheye_realtime_router
|
||||
from k1link.web.e47_semantic_slam_api import build_e47_semantic_slam_router
|
||||
from k1link.web.l3_pointpillars_visual_api import build_l3_pointpillars_visual_router
|
||||
from k1link.web.l31_pointpillars_ravnoves_api import build_l31_pointpillars_ravnoves_router
|
||||
from k1link.web.l32_pointpillars_camera_review_api import (
|
||||
build_l32_pointpillars_camera_review_router,
|
||||
)
|
||||
from k1link.web.l33_camera_first_detector_review_api import (
|
||||
build_l33_camera_first_detector_review_router,
|
||||
)
|
||||
from k1link.web.l34_annotation_api import (
|
||||
build_l34_annotation_router,
|
||||
build_l34d_blind_annotation_router,
|
||||
)
|
||||
from k1link.web.l34_right_yolox_truth_island_api import (
|
||||
build_l34_right_yolox_truth_island_freeze_router,
|
||||
)
|
||||
from k1link.web.l34a_assisted_yolox_error_audit_api import (
|
||||
build_l34a_assisted_yolox_error_audit_router,
|
||||
)
|
||||
from k1link.web.l34b_nested_box_consolidation_api import build_l34b_nested_box_consolidation_router
|
||||
from k1link.web.l34c_tile_seam_stitch_api import build_l34c_tile_seam_stitch_router
|
||||
from k1link.web.l34d_cumulative_postprocessing_api import (
|
||||
build_l34d_cumulative_postprocessing_router,
|
||||
)
|
||||
from k1link.web.l34e_self_review_diagnostic_api import build_l34e_self_review_diagnostic_router
|
||||
from k1link.web.l34f_adjudication_api import build_l34f_adjudication_router
|
||||
from k1link.web.laboratory_api import build_laboratory_router
|
||||
from k1link.web.laboratory_report_api import build_laboratory_report_router
|
||||
from k1link.web.m4_threat_replay_api import build_m4_threat_replay_router
|
||||
from k1link.web.m48_object_quality_api import build_m48_object_quality_router
|
||||
from k1link.web.m48r3_static_occupancy_api import build_m48r3_static_occupancy_router
|
||||
from k1link.web.m48s_fixed_class_detector_lab_api import build_m48s_fixed_class_detector_lab_router
|
||||
from k1link.web.m48t_risk_quality_lab_api import build_m48t_risk_quality_lab_router
|
||||
from k1link.web.m49_physical_safety_playback_api import build_m49_physical_safety_playback_router
|
||||
from k1link.web.m49_tgs_fail_closed_api import build_m49_tgs_fail_closed_router
|
||||
from k1link.web.m49_tgs_full_shadow_api import build_m49_tgs_full_shadow_router
|
||||
from k1link.web.vegetation_shadow_lab_api import (
|
||||
build_vegetation_benchmark_lab_router,
|
||||
build_vegetation_shadow_lab_router,
|
||||
)
|
||||
|
||||
|
||||
def build_worker_laboratory_router(
|
||||
*,
|
||||
repository_root: Path,
|
||||
configuration_root: Path,
|
||||
presentation_root: Path,
|
||||
camera_frame_provider: Callable[[str, int], RecordedCameraFrame] | None = None,
|
||||
camera_playback_provider: Callable | None = None,
|
||||
canonical_recording_provider: Callable[[str], tuple[Path, str] | None] | None = None,
|
||||
ffmpeg_path: Path | None = None,
|
||||
evaluation_runner: LaboratoryRunner | None = None,
|
||||
) -> APIRouter:
|
||||
"""Compose identical LAB routes against Worker-owned evidence and result roots."""
|
||||
router = APIRouter()
|
||||
evidence_registry = LaboratoryEvidenceRegistry.from_directory(
|
||||
configuration_root / "laboratories"
|
||||
)
|
||||
value_registry = LaboratoryValueReviewRegistry.from_file(
|
||||
configuration_root / "laboratory-value-review.json"
|
||||
)
|
||||
reports = LaboratoryEvidenceReportService(
|
||||
evidence_registry, lambda: repository_root / ".runtime" / "compute-experiments"
|
||||
)
|
||||
try:
|
||||
raw_evidence = M48RawEvidenceReader.from_repository(
|
||||
repository_root=repository_root,
|
||||
threat_result_root=repository_root
|
||||
/ ".runtime/compute-experiments/m4/replay-threat"
|
||||
/ M48_EXPECTED_THREAT_RESULT_ID,
|
||||
)
|
||||
except (M48RawEvidenceError, OSError, ValueError):
|
||||
raw_evidence = None
|
||||
|
||||
router.include_router(
|
||||
build_laboratory_router(
|
||||
e29_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e29" / "results"
|
||||
),
|
||||
local_surface_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "k1-local-surface-v1"
|
||||
/ "models"
|
||||
),
|
||||
source_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e10" / "lidar-packs"
|
||||
),
|
||||
source_result_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e10" / "worker-results"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_laboratory_report_router(
|
||||
value_registry,
|
||||
reports,
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_advanced_laboratory_router(
|
||||
evidence_registry=evidence_registry,
|
||||
evidence_runtime_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments"
|
||||
),
|
||||
e31_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "e31"
|
||||
/ "source-qualifications"
|
||||
),
|
||||
e32_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e32" / "results"
|
||||
),
|
||||
e33_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e33" / "results"
|
||||
),
|
||||
e34_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e34" / "results"
|
||||
),
|
||||
e35_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e35" / "results"
|
||||
),
|
||||
e37_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e37" / "results"
|
||||
),
|
||||
e38_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e38" / "results"
|
||||
),
|
||||
e39_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e39" / "results"
|
||||
),
|
||||
e40_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e40" / "results"
|
||||
),
|
||||
l3_visual_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "l3" / "visual-audits"
|
||||
),
|
||||
l31_ravnoves_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "pointpillars-ravnoves"
|
||||
),
|
||||
l32_camera_review_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "pointpillars-camera-review"
|
||||
),
|
||||
l33_camera_first_review_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "camera-first-detector-review"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_l3_pointpillars_visual_router(
|
||||
root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "l3" / "visual-audits"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_l31_pointpillars_ravnoves_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "pointpillars-ravnoves"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_l32_pointpillars_camera_review_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "pointpillars-camera-review"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_l33_camera_first_detector_review_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "camera-first-detector-review"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_l34_right_yolox_truth_island_freeze_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "right-yolox-truth-island-freeze"
|
||||
),
|
||||
truth_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46" / "results"
|
||||
),
|
||||
evaluation_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e2" / "evaluation-packs"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e46_blind_review_router(
|
||||
truth_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46" / "results"
|
||||
),
|
||||
evaluation_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e2" / "evaluation-packs"
|
||||
),
|
||||
annotation_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "laboratory-annotations" / "e46-blind"
|
||||
),
|
||||
submission_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e48" / "review-submissions"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e46a_ai_engineering_preannotation_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "e46a"
|
||||
/ "ai-engineering-preannotations"
|
||||
),
|
||||
annotation_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "laboratory-annotations" / "e46a-correction"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e46b_temporal_motion_router(
|
||||
root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46b" / "temporal-motion"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e46c_full_replay_world_tracks_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "e46c"
|
||||
/ "full-replay-world-tracks"
|
||||
),
|
||||
e26_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e10" / "worker-results"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e46d_temporal_failure_audit_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "e46d"
|
||||
/ "temporal-failure-audits"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_m4_threat_replay_router(
|
||||
root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "m4" / "replay-threat"
|
||||
),
|
||||
repository_root_provider=lambda: repository_root,
|
||||
camera_frame_provider=(
|
||||
camera_frame_provider if camera_frame_provider is not None else None
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_m48_object_quality_router(
|
||||
pack_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "m48"
|
||||
/ "object-quality-packs"
|
||||
),
|
||||
workflow_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "laboratory-annotations" / "m48-object-quality"
|
||||
),
|
||||
truth_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "m48" / "object-truth-seals"
|
||||
),
|
||||
result_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "m48"
|
||||
/ "object-quality-results"
|
||||
),
|
||||
small_static_result_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "m48"
|
||||
/ "small-static-passage-regression-results"
|
||||
),
|
||||
static_occupancy_result_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "m48"
|
||||
/ "static-occupancy-qualification-results"
|
||||
),
|
||||
camera_frame_provider=(
|
||||
camera_frame_provider if camera_frame_provider is not None else None
|
||||
),
|
||||
camera_playback_provider=(camera_playback_provider),
|
||||
spatial_evidence_provider=raw_evidence,
|
||||
evaluation_runner=evaluation_runner,
|
||||
evaluation_receipt_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "laboratory-run-receipts"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_m48r3_static_occupancy_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "m48"
|
||||
/ "static-occupancy-shadow-results"
|
||||
),
|
||||
repository_root_provider=lambda: repository_root,
|
||||
camera_frame_provider=(
|
||||
camera_frame_provider if camera_frame_provider is not None else None
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_m49_tgs_fail_closed_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "m49"
|
||||
/ "tgs-fail-closed-results"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_m49_tgs_full_shadow_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "m49"
|
||||
/ "tgs-full-shadow-results"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_vegetation_shadow_lab_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "lab-v1-vegetation"
|
||||
/ "results"
|
||||
),
|
||||
canonical_recording_provider=canonical_recording_provider,
|
||||
camera_frame_provider=(
|
||||
camera_frame_provider if camera_frame_provider is not None else None
|
||||
),
|
||||
jobs_root=repository_root / ".runtime" / "compute-jobs",
|
||||
rerun_overlay_cache_root=(presentation_root / "laboratory-rerun-overlays"),
|
||||
ffmpeg_path=ffmpeg_path,
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_vegetation_benchmark_lab_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "lab-v1-vegetation-benchmark"
|
||||
/ "results"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_m49_physical_safety_playback_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "m49"
|
||||
/ "physical-safety-playback-results"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_m48s_fixed_class_detector_lab_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "m48s-semantic-shadow"
|
||||
/ "fixed-class-detector-lab-results"
|
||||
),
|
||||
repository_root_provider=lambda: repository_root,
|
||||
camera_frame_provider=(
|
||||
camera_frame_provider if camera_frame_provider is not None else None
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_m48t_risk_quality_lab_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "m48t-risk-quality"
|
||||
/ "lab-results"
|
||||
),
|
||||
native_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "m48t-risk-quality"
|
||||
/ "native-lab-results"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e47_semantic_slam_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "e47"
|
||||
/ "semantic-slam-results"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e46e_ready_stack_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "e46e"
|
||||
/ "ready-stack-results"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e46f_dashcam_bakeoff_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "e46f"
|
||||
/ "dashcam-bakeoff-results"
|
||||
),
|
||||
e46e_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "e46e"
|
||||
/ "ready-stack-results"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e46g_rectified_detector_bakeoff_router(
|
||||
root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46g" / "results"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e46h_full_rectified_front_replay_router(
|
||||
root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46h" / "results"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e46i_grounding_dino_full_replay_router(
|
||||
root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46i" / "results"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e46j_raw_fisheye_realtime_router(
|
||||
root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46j" / "results"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_l34_annotation_router(
|
||||
root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "right-yolox-truth-island-freeze"
|
||||
),
|
||||
truth_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46" / "results"
|
||||
),
|
||||
evaluation_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e2" / "evaluation-packs"
|
||||
),
|
||||
annotation_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "laboratory-annotations" / "l34"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_l34a_assisted_yolox_error_audit_router(
|
||||
audit_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "assisted-yolox-error-audits"
|
||||
),
|
||||
l34_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "right-yolox-truth-island-freeze"
|
||||
),
|
||||
truth_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46" / "results"
|
||||
),
|
||||
evaluation_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e2" / "evaluation-packs"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_l34b_nested_box_consolidation_router(
|
||||
shadow_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "nested-box-consolidation-shadows"
|
||||
),
|
||||
l34_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "right-yolox-truth-island-freeze"
|
||||
),
|
||||
truth_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46" / "results"
|
||||
),
|
||||
evaluation_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e2" / "evaluation-packs"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_l34c_tile_seam_stitch_router(
|
||||
shadow_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "tile-seam-stitch-shadows"
|
||||
),
|
||||
l34_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "right-yolox-truth-island-freeze"
|
||||
),
|
||||
truth_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46" / "results"
|
||||
),
|
||||
evaluation_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e2" / "evaluation-packs"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_l34d_cumulative_postprocessing_router(
|
||||
candidate_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "cumulative-postprocessing-candidates"
|
||||
),
|
||||
l34_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "right-yolox-truth-island-freeze"
|
||||
),
|
||||
truth_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46" / "results"
|
||||
),
|
||||
evaluation_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e2" / "evaluation-packs"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_l34d_blind_annotation_router(
|
||||
candidate_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "cumulative-postprocessing-candidates"
|
||||
),
|
||||
l34_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "right-yolox-truth-island-freeze"
|
||||
),
|
||||
truth_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46" / "results"
|
||||
),
|
||||
evaluation_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e2" / "evaluation-packs"
|
||||
),
|
||||
annotation_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "laboratory-annotations" / "l34d-blind"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_l34e_self_review_diagnostic_router(
|
||||
diagnostic_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "self-review-diagnostics"
|
||||
),
|
||||
candidate_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "cumulative-postprocessing-candidates"
|
||||
),
|
||||
l34_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "right-yolox-truth-island-freeze"
|
||||
),
|
||||
truth_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46" / "results"
|
||||
),
|
||||
evaluation_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e2" / "evaluation-packs"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_l34f_adjudication_router(
|
||||
diagnostic_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "self-review-diagnostics"
|
||||
),
|
||||
candidate_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "cumulative-postprocessing-candidates"
|
||||
),
|
||||
l34_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "right-yolox-truth-island-freeze"
|
||||
),
|
||||
truth_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e46" / "results"
|
||||
),
|
||||
evaluation_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e2" / "evaluation-packs"
|
||||
),
|
||||
adjudication_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "laboratory-annotations" / "l34f-adjudication"
|
||||
),
|
||||
result_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "l3"
|
||||
/ "adjudicated-references"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e30_review_router(
|
||||
materialization_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e30" / "materializations"
|
||||
),
|
||||
review_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e30" / "review-packs"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e40_case_review_router(
|
||||
e40_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e40" / "results"
|
||||
),
|
||||
operator_review_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e40" / "operator-reviews"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e30_engineering_router(
|
||||
generation_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "e30"
|
||||
/ "engineering-generations"
|
||||
),
|
||||
materialization_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e30" / "materializations"
|
||||
),
|
||||
review_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e30" / "review-packs"
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
router.include_router(
|
||||
build_e30_human_review_router(
|
||||
materialization_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e30" / "materializations"
|
||||
),
|
||||
review_pack_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e30" / "review-packs"
|
||||
),
|
||||
engineering_generation_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "e30"
|
||||
/ "engineering-generations"
|
||||
),
|
||||
draft_root_provider=lambda: (
|
||||
repository_root / ".runtime" / "compute-experiments" / "e30" / "human-review-drafts"
|
||||
),
|
||||
generation_root_provider=lambda: (
|
||||
repository_root
|
||||
/ ".runtime"
|
||||
/ "compute-experiments"
|
||||
/ "e30"
|
||||
/ "human-review-generations"
|
||||
),
|
||||
)
|
||||
)
|
||||
return router
|
||||
Reference in New Issue
Block a user