fffiloni commited on
Commit
37e02b1
·
verified ·
1 Parent(s): e477c9c

Upload 6 files

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -221,7 +221,7 @@ def register_custom_routes(fastapi_app: FastAPI) -> None:
221
  return JSONResponse(
222
  {
223
  "name": "Agentic Space Factory",
224
- "version": "v91-pi-model-detection-from-published-traces",
225
  "bucket_default": settings.bucket_name,
226
  "workflows": ["build_from_model_card", "validate_existing_space", "runs_explorer"],
227
  "custom_ui_status": "root_custom_ui",
@@ -409,11 +409,11 @@ def register_custom_routes(fastapi_app: FastAPI) -> None:
409
  return JSONResponse({"run": selected, "view": view, "bucket_source": bucket_source, "reason": "latest_resumable_run" if resumable else "latest_run"})
410
 
411
  @fastapi_app.get("/api/runs/{run_id}")
412
- async def api_run_detail(request: Request, run_id: str, bucket_name: str = settings.bucket_name): # type: ignore[no-untyped-def]
413
  ctx = _oauth_context_from_request(request)
414
  run_id = validate_run_id(run_id)
415
  bucket_source = user_bucket_source(username=ctx["username"], bucket_name=bucket_name)
416
- bundle = read_run_bundle(run_id, bucket_source=bucket_source, token=ctx["token"])
417
  view = build_run_view_model(run_id, bundle, bucket_source=bucket_source)
418
  return JSONResponse({"run_id": run_id, "bucket_source": bucket_source, "view": view, **bundle})
419
 
@@ -422,7 +422,7 @@ def register_custom_routes(fastapi_app: FastAPI) -> None:
422
  ctx = _oauth_context_from_request(request)
423
  run_id = validate_run_id(run_id)
424
  bucket_source = user_bucket_source(username=ctx["username"], bucket_name=bucket_name)
425
- bundle = read_run_bundle(run_id, bucket_source=bucket_source, token=ctx["token"])
426
  return JSONResponse(build_run_view_model(run_id, bundle, bucket_source=bucket_source))
427
 
428
  @fastapi_app.post("/api/runs/{run_id}/cancel")
 
221
  return JSONResponse(
222
  {
223
  "name": "Agentic Space Factory",
224
+ "version": "v93-run-load-latency-events-fix",
225
  "bucket_default": settings.bucket_name,
226
  "workflows": ["build_from_model_card", "validate_existing_space", "runs_explorer"],
227
  "custom_ui_status": "root_custom_ui",
 
409
  return JSONResponse({"run": selected, "view": view, "bucket_source": bucket_source, "reason": "latest_resumable_run" if resumable else "latest_run"})
410
 
411
  @fastapi_app.get("/api/runs/{run_id}")
412
+ async def api_run_detail(request: Request, run_id: str, bucket_name: str = settings.bucket_name, include_heavy: bool = True): # type: ignore[no-untyped-def]
413
  ctx = _oauth_context_from_request(request)
414
  run_id = validate_run_id(run_id)
415
  bucket_source = user_bucket_source(username=ctx["username"], bucket_name=bucket_name)
416
+ bundle = read_run_bundle(run_id, bucket_source=bucket_source, token=ctx["token"], include_heavy=include_heavy)
417
  view = build_run_view_model(run_id, bundle, bucket_source=bucket_source)
418
  return JSONResponse({"run_id": run_id, "bucket_source": bucket_source, "view": view, **bundle})
419
 
 
422
  ctx = _oauth_context_from_request(request)
423
  run_id = validate_run_id(run_id)
424
  bucket_source = user_bucket_source(username=ctx["username"], bucket_name=bucket_name)
425
+ bundle = read_run_bundle(run_id, bucket_source=bucket_source, token=ctx["token"], include_heavy=False)
426
  return JSONResponse(build_run_view_model(run_id, bundle, bucket_source=bucket_source))
427
 
428
  @fastapi_app.post("/api/runs/{run_id}/cancel")