fffiloni commited on
Commit
451e950
verified
1 Parent(s): c1df35f

Upload 14 files

Browse files
Files changed (2) hide show
  1. src/timeline_model.py +23 -9
  2. src/version.py +2 -2
src/timeline_model.py CHANGED
@@ -180,6 +180,14 @@ def build_live_validation_model(bundle: dict[str, Any]) -> dict[str, Any]:
180
  smoke_status = _lower(smoke.get("status") or smoke_event.get("status"))
181
  endpoints = gate.get("endpoints") or gate.get("api_endpoints") or gate.get("named_endpoints") or []
182
  endpoint_count = len(endpoints) if isinstance(endpoints, list) else 0
 
 
 
 
 
 
 
 
183
 
184
  severity = "info"
185
  stage = "waiting_for_space"
@@ -262,8 +270,9 @@ def build_live_validation_model(bundle: dict[str, Any]) -> dict[str, Any]:
262
  "runtime_stage": runtime_stage,
263
  "runtime_error": runtime_error,
264
  "health": "passed" if health_passed else "failed" if health_failed else "pending",
265
- "gradio_schema": "detected" if endpoint_count else "pending",
266
  "endpoint_count": endpoint_count,
 
267
  "generation_smoke": "passed" if smoke_status == "success" else "failed" if smoke and smoke_status in FAILED_STATUSES.union({"timeout", "exception"}) else "pending",
268
  "live_status_stage": live_stage,
269
  "live_status_updated_at": live_status.get("updated_at") or "",
@@ -454,16 +463,19 @@ def _build_phase_details(bundle: dict[str, Any], phase: str) -> list[dict[str, A
454
  details.append({"label": "Health passed", "status": "complete"})
455
  elif live.get("health") == "failed":
456
  details.append({"label": "Health not confirmed", "status": "warning"})
 
 
457
  if live.get("gradio_schema") == "detected":
458
  count = live.get("endpoint_count") or 0
459
- details.append({"label": f"Gradio endpoints detected: {count}", "status": "info"})
460
- else:
 
 
 
 
461
  details.append({"label": "Waiting for Gradio endpoints", "status": "info"})
462
- smoke = _smoke(bundle)
463
- if live.get("generation_smoke") == "passed":
464
- latency = smoke.get("latency_seconds") or smoke.get("observed_latency_seconds")
465
- text = f"Generation passed in {latency}s" if latency is not None else "Generation passed"
466
- details.append({"label": text, "status": "complete"})
467
  elif live.get("generation_smoke") == "failed":
468
  reason = smoke.get("failure_type") or smoke.get("error") or live.get("message") or "Generation was not verified"
469
  details.append({"label": f"Generation not verified: {reason}", "status": "warning"})
@@ -479,7 +491,9 @@ def _build_phase_details(bundle: dict[str, Any], phase: str) -> list[dict[str, A
479
  details.append({"label": blocker, "status": "failed"})
480
  recommendation = smoke.get("recommended_zero_gpu_duration_seconds") or (_gate(bundle).get("zero_gpu_duration_recommendation") or {}).get("recommended_zero_gpu_duration_seconds")
481
  if recommendation:
482
- details.append({"label": f"ZeroGPU duration recommendation: {recommendation}s", "status": "complete"})
 
 
483
  elif phase == "archive":
484
  eval_status = _eval_publish(bundle)
485
  if eval_status:
 
180
  smoke_status = _lower(smoke.get("status") or smoke_event.get("status"))
181
  endpoints = gate.get("endpoints") or gate.get("api_endpoints") or gate.get("named_endpoints") or []
182
  endpoint_count = len(endpoints) if isinstance(endpoints, list) else 0
183
+ selected_endpoint = str(
184
+ smoke.get("api_name")
185
+ or gate.get("api_name")
186
+ or gate.get("selected_endpoint")
187
+ or gate.get("selected_api_name")
188
+ or ""
189
+ ).strip()
190
+ endpoint_known = bool(endpoint_count or selected_endpoint or smoke_status == "success" or signals.get("generation_smoke_passed") is True)
191
 
192
  severity = "info"
193
  stage = "waiting_for_space"
 
270
  "runtime_stage": runtime_stage,
271
  "runtime_error": runtime_error,
272
  "health": "passed" if health_passed else "failed" if health_failed else "pending",
273
+ "gradio_schema": "detected" if endpoint_known else "pending",
274
  "endpoint_count": endpoint_count,
275
+ "selected_endpoint": selected_endpoint,
276
  "generation_smoke": "passed" if smoke_status == "success" else "failed" if smoke and smoke_status in FAILED_STATUSES.union({"timeout", "exception"}) else "pending",
277
  "live_status_stage": live_stage,
278
  "live_status_updated_at": live_status.get("updated_at") or "",
 
463
  details.append({"label": "Health passed", "status": "complete"})
464
  elif live.get("health") == "failed":
465
  details.append({"label": "Health not confirmed", "status": "warning"})
466
+ smoke = _smoke(bundle)
467
+ generation_passed = live.get("generation_smoke") == "passed"
468
  if live.get("gradio_schema") == "detected":
469
  count = live.get("endpoint_count") or 0
470
+ selected = str(live.get("selected_endpoint") or smoke.get("api_name") or "").strip()
471
+ if selected:
472
+ details.append({"label": f"Endpoint selected: {selected}", "status": "complete"})
473
+ elif count:
474
+ details.append({"label": f"Gradio endpoints detected: {count}", "status": "complete" if generation_passed else "info"})
475
+ elif not generation_passed:
476
  details.append({"label": "Waiting for Gradio endpoints", "status": "info"})
477
+ if generation_passed:
478
+ pass
 
 
 
479
  elif live.get("generation_smoke") == "failed":
480
  reason = smoke.get("failure_type") or smoke.get("error") or live.get("message") or "Generation was not verified"
481
  details.append({"label": f"Generation not verified: {reason}", "status": "warning"})
 
491
  details.append({"label": blocker, "status": "failed"})
492
  recommendation = smoke.get("recommended_zero_gpu_duration_seconds") or (_gate(bundle).get("zero_gpu_duration_recommendation") or {}).get("recommended_zero_gpu_duration_seconds")
493
  if recommendation:
494
+ source_hw = str(_smoke(bundle).get("hardware") or _gate(bundle).get("hardware") or (bundle.get("summary") or {}).get("selected_hardware") or "").strip()
495
+ suffix = f" 路 measured on {source_hw}" if source_hw else ""
496
+ details.append({"label": f"ZeroGPU estimate: {recommendation}s{suffix}", "status": "complete"})
497
  elif phase == "archive":
498
  eval_status = _eval_publish(bundle)
499
  if eval_status:
src/version.py CHANGED
@@ -1,7 +1,7 @@
1
  from __future__ import annotations
2
 
3
- ASF_APP_VERSION = "v190.19"
4
- ASF_RELEASE_NAME = "Agentic Space Factory v190.19"
5
 
6
 
7
  def resolve_app_version(value: str | None = None) -> str:
 
1
  from __future__ import annotations
2
 
3
+ ASF_APP_VERSION = "v190.20"
4
+ ASF_RELEASE_NAME = "Agentic Space Factory v190.20"
5
 
6
 
7
  def resolve_app_version(value: str | None = None) -> str: