Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Upload 6 files
Browse files- CHANGELOG.md +13 -407
- README.md +14 -0
- app.py +5 -1
CHANGELOG.md
CHANGED
|
@@ -1,412 +1,18 @@
|
|
| 1 |
-
#
|
| 2 |
|
| 3 |
-
-
|
| 4 |
-
-
|
| 5 |
-
-
|
| 6 |
-
-
|
| 7 |
|
|
|
|
| 8 |
|
| 9 |
-
#
|
| 10 |
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
-
-
|
| 15 |
-
|
| 16 |
-
## v122 — Stable UI rollback after latency cleanup regression
|
| 17 |
-
|
| 18 |
-
- Reverted the risky v121 client-side run-detail cache/polling optimizations after they caused build/run UI instability and flicker in real usage.
|
| 19 |
-
- Restored the proven v120 Active Run / Space Test selection and polling behavior while keeping the v118/v119/v120 Pi recovery core intact.
|
| 20 |
-
- Kept the Agent recovery panel, unified agent traces, compact Run Explorer, and blockage protocol UI from the stable v120 line.
|
| 21 |
-
- Removed the v121 rendering-signature shortcuts and progress-payload cache writes that could leave panels in stale or inconsistent states.
|
| 22 |
-
- This release prioritizes correctness and stable polling over speculative latency optimization.
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
## v120 — Agent recovery UI for blockage protocol
|
| 26 |
-
|
| 27 |
-
- Added an **Agent recovery** card to the Active Run panel so the v118/v119 core recovery protocol is visible to users.
|
| 28 |
-
- The card summarizes Pi diagnosis decisions, selected action, logs quality/failure category/confidence, evidence, next step, and the diagnose → decide → act → revalidate ladder.
|
| 29 |
-
- Exposed `repair/REPAIR_DECISION.json` and `repair/BLOCKAGE.json` through the backend bundle, progress payload, and Run traces dock.
|
| 30 |
-
- Kept the existing unified `agent_trace.jsonl` as the canonical raw/redacted narrative across initial build, diagnosis, and repair.
|
| 31 |
-
- Added regression tests for the recovery panel, decision/blockage artifact links, progress payload exposure, and docs.
|
| 32 |
-
|
| 33 |
-
# Changelog
|
| 34 |
-
|
| 35 |
-
## v119 — unified agentic Pi traces
|
| 36 |
-
|
| 37 |
-
- Added a run-level `traces/raw/agent_trace.jsonl` and `traces/redacted/agent_trace.jsonl` journal that ties together the initial Pi build, Pi blockage diagnosis, repair decision, and optional repair patch into one auditable agent narrative.
|
| 38 |
-
- Kept specialized logs (`logs/pi_output.txt`, `logs/pi_diagnosis_output.txt`, `logs/pi_repair_output.txt`) as detailed artifacts, but made the curated `Pi RAW` / `Pi redacted` dock point to the unified trace when available.
|
| 39 |
-
- Diagnosis and repair phases now add explicit trace records for command start/end, output artifacts, repair decisions, and repair plan/summary artifacts so they no longer look like disconnected conversations.
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
## v118 — Pi diagnosis blockage protocol
|
| 43 |
-
|
| 44 |
-
- Added a Pi **blockage diagnosis** step before any code repair. Failures now produce `repair/INCIDENT_BRIEF.md`, `repair/PI_DIAGNOSIS_GOAL.md`, `repair/REPAIR_DECISION.json`, and `logs/pi_diagnosis_output.txt`.
|
| 45 |
-
- Pi/Qwen now chooses a bounded action instead of being asked to patch immediately: `wait_for_logs`, `inspect_more_logs`, `factory_rebuild_same_code`, `patch_code`, `request_manual_hardware`, or `declare_technical_blocker`.
|
| 46 |
-
- Added Factory guardrails: no code patch on empty/no-reason logs, no patch for auth/quota/hardware blockers, and strict one-action budgets for wait, same-code rebuild, and patch repair.
|
| 47 |
-
- Added same-code factory rebuild recovery for HF build/runtime flakes where logs are empty or non-actionable.
|
| 48 |
-
- Patch repair now runs only after Pi diagnosis chooses `patch_code` and the Factory validates the decision.
|
| 49 |
-
- Added blockage artifacts and timeline events: `failure_detected`, `failure_diagnosis`, `pi_diagnosis`, `repair_decision`, `wait_for_logs`, `factory_rebuild`, `technical_blocker`, and `manual_hardware_required`.
|
| 50 |
-
- Updated tests to protect the diagnosis-before-patch contract and the failure timeline mapping.
|
| 51 |
-
|
| 52 |
-
## v117 — Structured repair mode and repair timeline
|
| 53 |
-
|
| 54 |
-
- Reworked Pi repair from a loose log-based retry into a structured repair method.
|
| 55 |
-
- Added failure classification before repair (`dependency_error`, `import_error`, `gradio_api_mismatch`, `cuda_oom`, `model_loading_error`, `hf_auth_error`, `space_boot_timeout`, `wrong_output_type`, `zero_gpu_duration_error`, or `unknown_runtime_error`).
|
| 56 |
-
- The worker now writes `repair/REPAIR_BRIEF.md`, requests `REPAIR_PLAN.md` before patching, and stores `REPAIR_SUMMARY.md` after patching.
|
| 57 |
-
- Added strict repair constraints: patch the current workspace, do not rebuild unnecessarily, preserve real inference, do not fake outputs, keep the health endpoint, and preserve the validation contract.
|
| 58 |
-
- Added repair sanity checks before redeploying a patched workspace.
|
| 59 |
-
- Added repair-specific events: `repair_diagnosis`, `repair_plan`, `repair_patch`, `repair_upload`, and `repair_validation`.
|
| 60 |
-
- Updated the progress timeline so repair phases are visible and terminal failures always have a red failure point.
|
| 61 |
-
- Added a Repair document shortcut in the Active Run traces dock when repair artifacts exist.
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
## v116 — Compact Run Explorer and billing note relocation
|
| 65 |
-
|
| 66 |
-
- Reworked the Run Explorer from large cards into a compact premium navigation list with one primary line, one context line, status pill, relative time and a discreet delete action.
|
| 67 |
-
- Kept build and validation rows distinct while making the business entity more prominent than the raw run ID.
|
| 68 |
-
- Moved the Inference Providers / paid credits / restricted A100-H200 fallback note out of New Build and into Billing & compute.
|
| 69 |
-
- Added regression tests for the compact list and billing-note placement.
|
| 70 |
-
|
| 71 |
-
## v114 — Premium vector activity feed icons
|
| 72 |
-
|
| 73 |
-
- Replaced text-coded activity markers such as `PI`, `API`, and `GPU` with inline SVG icons rendered by a dedicated `renderEventIcon(...)` helper.
|
| 74 |
-
- Mapped event types to product-style vector icons for upload, hardware, Space creation, generation smoke tests, traces, reports, model analysis, auth, running and error states.
|
| 75 |
-
- Added CSS states for vector activity icons, including status colors and a lightweight running animation for pending/running events.
|
| 76 |
-
- Kept the event feed layout compact and readable while avoiding emoji or text badges as the primary iconography.
|
| 77 |
-
|
| 78 |
-
## v112 — Verification, cleanup, and documentation refresh
|
| 79 |
-
|
| 80 |
-
- Added one-time JS binding helpers for navigation, action buttons, filters and form controls to prevent accidental listener duplication if initialization is re-run.
|
| 81 |
-
- Switched run pagination to delegated events so rerendering the controls does not attach fresh listeners on every page update.
|
| 82 |
-
- Added a final CSS cohesion layer for narrow panels, model pre-scan content, endpoint chips, Run Stats, run cards and activity feeds.
|
| 83 |
-
- Updated README and docs to cover the calibrated model pre-scan, `Tongyi-MAI/Z-Image-Turbo` default, endpoint picker behavior, UI reliability checks, and current production-preview guidance.
|
| 84 |
-
|
| 85 |
-
## v111 — Calibrated model-card pre-scan default
|
| 86 |
-
|
| 87 |
-
- Set the default model example to `Tongyi-MAI/Z-Image-Turbo`, the known-good default test model.
|
| 88 |
-
- Calibrated the fast pre-scan to treat a clear Diffusers model card with safetensors and runnable usage code as a strong positive signal.
|
| 89 |
-
- Added model-card guidance signals for Diffusers examples, pipeline class and runtime hints.
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
## v110 — Model pre-scan gate
|
| 93 |
-
|
| 94 |
-
- Added a fast Model pre-scan card in New Build.
|
| 95 |
-
- New backend endpoint: `POST /api/models/pre-scan`.
|
| 96 |
-
- The scan checks Hub metadata, file names, safetensors, gated/private state, config/model_index and custom-code signals without downloading model weights.
|
| 97 |
-
- Build launch is gated until the current model has been scanned. `unsupported` blocks launch; `risky` requires explicit user acknowledgement.
|
| 98 |
-
|
| 99 |
-
## v109 — Cohesive implementation mode labels
|
| 100 |
-
|
| 101 |
-
- Centralized implementation-mode copy in shared UI helpers.
|
| 102 |
-
- Kept compact dropdown labels and reused the same user-facing labels in Active Run and Run Explorer metadata.
|
| 103 |
-
- Added a Build goal field in Active Run with hover help, without exposing internal mode ids.
|
| 104 |
-
|
| 105 |
-
## v108 — Compact implementation mode labels
|
| 106 |
-
|
| 107 |
-
- Shortened the Implementation mode dropdown labels to keep the left column clean.
|
| 108 |
-
- Added a dynamic helper below the field explaining the selected mode without changing internal values.
|
| 109 |
-
|
| 110 |
-
## v107 — Clear build goals and safer automatic hardware fallbacks
|
| 111 |
-
|
| 112 |
-
- Renamed implementation-mode labels to user-facing build goals while keeping the same internal values.
|
| 113 |
-
- Removed A100 and H200 from automatic fallback UI choices.
|
| 114 |
-
- Added backend and worker-side sanitization so old clients cannot request high/restricted hardware as automatic fallback.
|
| 115 |
-
- Updated docs to clarify that A100/H200-class hardware should be selected manually only when available to the account or organization.
|
| 116 |
-
|
| 117 |
-
## v106 — Documentation and production-readiness pass
|
| 118 |
-
|
| 119 |
-
- Rewrote README to match the current v105 product UI: left storage/build/billing column, center Active Run/Space Test tabs, right Run Explorer/Run Stats column.
|
| 120 |
-
- Updated architecture docs to describe the Pi gist instruction flow, per-user Bucket layout, validation-run separation, trace dock, run discovery, latency, and ZeroGPU duration recommendation.
|
| 121 |
-
- Updated public-preview docs with the current demo path and production-readiness note.
|
| 122 |
-
- Updated security docs with token, Bucket, raw/redacted trace, billing, and generated-Space review guidance.
|
| 123 |
-
- Updated next steps to focus on production hardening, cost guardrails, trace safety, repair workflow, validation presets, and retention controls.
|
| 124 |
-
|
| 125 |
-
## v100 — Compact storage and billing cockpit
|
| 126 |
-
|
| 127 |
-
- Reworked the left-column Run storage block into a compact status card with clearer checking/creating/ready feedback.
|
| 128 |
-
- Added a Billing & compute card below New Build showing account, payment-readiness signal, inference-credit tier, and links to Hugging Face Billing, Jobs pricing, and Inference Providers pricing.
|
| 129 |
-
- Added `/api/billing/status` to expose only the billing signals available through OAuth, without pretending to mirror numeric usage totals from the HF Billing dashboard.
|
| 130 |
-
- Kept the build and validation workflows unchanged.
|
| 131 |
-
|
| 132 |
-
## v47 — Simple spec reset
|
| 133 |
-
|
| 134 |
-
- Reset the custom UI to three top-level tabs only: Build, Runs, and Space Test.
|
| 135 |
-
- Removed the run explorer from the Build tab so launching a new build stays focused.
|
| 136 |
-
- Made Runs the single place to inspect current and historical runs, progress, events, reports, diagnostics, and artifacts.
|
| 137 |
-
- Kept run selection in-place with no automatic tab switch.
|
| 138 |
-
- Preserved backend endpoints, run view models, recovery, bucket gating, and Space Test validation.
|
| 139 |
-
- Added responsive overrides so the simple layout stays readable on mobile.
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
## v46 — Run tab selection + mobile framing fixes
|
| 143 |
-
|
| 144 |
-
- Selecting a run no longer forces a navigation switch; it updates the visible run detail panels in place.
|
| 145 |
-
- Improved mobile responsive rules to prevent narrow grid columns from rendering words letter-by-letter.
|
| 146 |
-
- Added regression tests for run selection navigation and mobile text wrapping safeguards.
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
## V40 — Tabbed product UI and link/progress polish
|
| 150 |
-
|
| 151 |
-
- Replaced the left sidebar with a compact top tab workflow: **Run new build**, **Live progress**, and **Test Space**.
|
| 152 |
-
- Kept the Run Explorer inside the Live progress cockpit, so previous runs are inspectable without confusing the build form.
|
| 153 |
-
- Added a visible Logout action in the header.
|
| 154 |
-
- Made the Job link more reliable for historical runs by reconstructing it from `job_id` when the stored URL is missing.
|
| 155 |
-
- Reworked the live progress timeline to a compact wrapped step grid instead of a scrolling panel.
|
| 156 |
-
- Automatically switches to Live progress after launching a build or validation.
|
| 157 |
-
- Preserved bucket gating, per-user buckets, OAuth checks, hardware strategy, and validation Jobs.
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
## V36 - Docker OAuth dependency fix
|
| 161 |
-
|
| 162 |
-
- Added `huggingface_hub[oauth]>=1.0.0` to the runtime requirements so FastAPI OAuth via `attach_huggingface_oauth(...)` can initialize inside the Docker Space.
|
| 163 |
-
- Keeps the V35 Docker/FastAPI custom UI startup model unchanged: one `uvicorn` server, custom UI at `/`, `/custom` alias.
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
## v103 - Aggregated Run Stats
|
| 167 |
-
|
| 168 |
-
- Replaced the ambiguous Run Health panel with an aggregate-only Run Stats panel below the Run Explorer.
|
| 169 |
-
- Removed latest/current/issue rows that could mix multiple jobs and warnings.
|
| 170 |
-
- Added indexed run counters, build success rate, validation pass rate, validation latency median/p95, and aggregated issue counts.
|
| 171 |
-
- Kept Run Explorer as the navigation surface and central tabs as the detail surfaces.
|
| 172 |
-
|
| 173 |
-
## v102 - UI polish and fixed Bucket document links
|
| 174 |
-
|
| 175 |
-
- Fixed Bucket document links to use `/tree/runs/...` file URLs instead of broken `/blob/runs/...` URLs.
|
| 176 |
-
- Clarified the Billing & compute panel: OAuth can show payment readiness, while live quotas/spend remain in the Hugging Face Billing dashboard.
|
| 177 |
-
- Reworked Run Health rows with explicit labels, titles, status and metadata.
|
| 178 |
-
- Made Run Explorer cards narrow-safe so status/actions no longer overlap metadata.
|
| 179 |
-
- Replaced Space Test validation columns with a compact horizontal point timeline.
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
## V35 — Docker FastAPI root custom UI startup
|
| 183 |
-
|
| 184 |
-
- Switches the public product Space to `sdk: docker`.
|
| 185 |
-
- Adds a Dockerfile running exactly one uvicorn process: `uvicorn app:app --host 0.0.0.0 --port 7860`.
|
| 186 |
-
- Attaches Hugging Face OAuth directly to FastAPI with `attach_huggingface_oauth`.
|
| 187 |
-
- Removes the Gradio-mounted debug app from the normal startup path.
|
| 188 |
-
- Updates login/logout links to `/oauth/huggingface/login` and `/oauth/huggingface/logout`.
|
| 189 |
-
- Keeps the custom dashboard at `/` and `/custom`.
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
## V34 — Space startup fix
|
| 193 |
-
|
| 194 |
-
- Removed the explicit `uvicorn.run(app, host="0.0.0.0", port=7860)` launcher from `app.py`.
|
| 195 |
-
- Kept the custom FastAPI/ASGI `app` object exposed at module level so Spaces can run it without binding port 7860 twice.
|
| 196 |
-
- Added a regression test to prevent reintroducing a second server start.
|
| 197 |
-
|
| 198 |
-
## v32 — Mockup-aligned custom dashboard
|
| 199 |
-
|
| 200 |
-
- Reworked the custom Build page to match the validated dashboard mockup.
|
| 201 |
-
- Restored the Run Explorer as a first-class right-side panel on the main Build view.
|
| 202 |
-
- Moved live progress into the main cockpit with compact progress metadata and a vertical timeline.
|
| 203 |
-
- Added right-rail Run details, quick links, report preview, and “How it works” panels.
|
| 204 |
-
- Kept the full Runs page for deeper run inspection while making recent runs visible from the home dashboard.
|
| 205 |
-
- Preserved the V31 functional feedback, OAuth, bucket gating, and polling behavior.
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
## v103 - Aggregated Run Stats
|
| 209 |
-
|
| 210 |
-
- Replaced the ambiguous Run Health panel with an aggregate-only Run Stats panel below the Run Explorer.
|
| 211 |
-
- Removed latest/current/issue rows that could mix multiple jobs and warnings.
|
| 212 |
-
- Added indexed run counters, build success rate, validation pass rate, validation latency median/p95, and aggregated issue counts.
|
| 213 |
-
- Kept Run Explorer as the navigation surface and central tabs as the detail surfaces.
|
| 214 |
-
|
| 215 |
-
## V33 — Root custom dashboard
|
| 216 |
-
|
| 217 |
-
- Serve the custom dashboard directly at `/` and `/custom`.
|
| 218 |
-
- Move the legacy Gradio controls behind `/_gradio` for OAuth/debug only.
|
| 219 |
-
- Remove the product-facing Gradio iframe/preview experience.
|
| 220 |
-
- Keep OAuth-backed API routes and custom dashboard behavior intact.
|
| 221 |
-
- Add `uvicorn` as an explicit runtime dependency.
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
## v31 — Functional feedback verification
|
| 225 |
-
|
| 226 |
-
- Added stronger Custom UI feedback states so bucket checks, build launch, validation launch, and polling always show visible status.
|
| 227 |
-
- Added client-side validation for required build fields and JSON validation payloads before launching Jobs.
|
| 228 |
-
- Improved API error parsing so browser messages show clean backend errors instead of raw JSON blobs.
|
| 229 |
-
- Added backend bucket preflight checks for `/api/build` and `/api/validate` to prevent Jobs from launching against a missing user bucket.
|
| 230 |
-
- Added terminal-status handling so polling stops cleanly on `manual_hardware_required`, `technical_blocker`, `full_inference_candidate_health_passed`, and other final states.
|
| 231 |
-
- Added last-polled visibility and non-blocking retry feedback for live progress.
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
## v30 — Custom UI robustness cleanup
|
| 235 |
-
|
| 236 |
-
- Fixed the custom UI flex layout to avoid horizontal overflow on laptop-width screens.
|
| 237 |
-
- Removed duplicate auth-panel CSS and cleaned responsive behavior.
|
| 238 |
-
- Made the Run Explorer horizontally scrollable on medium screens and card-like on mobile.
|
| 239 |
-
- Restyled JSON textareas as monospace code inputs.
|
| 240 |
-
- Made the ZeroGPU-first checkbox user-controllable.
|
| 241 |
-
- Added build gating: users must check or create their private run bucket before launching a build from the custom UI.
|
| 242 |
-
- Removed leftover mockup-only readiness behavior and replaced it with a real bucket status pill.
|
| 243 |
-
|
| 244 |
-
## v25 — Custom UI OAuth bridge
|
| 245 |
-
|
| 246 |
-
- Wired the `/custom` frontend to real OAuth-backed API endpoints.
|
| 247 |
-
- Added custom UI actions for bucket check/create, build launch, validate launch, run progress polling, and run explorer.
|
| 248 |
-
- Added `/api/me`, `/api/bucket/status`, `/api/bucket/create`, `/api/build`, `/api/validate`, `/api/runs/{run_id}`, and `/api/runs/{run_id}/progress`.
|
| 249 |
-
- Added bucket run listing support for the Run Explorer.
|
| 250 |
-
- Kept the Gradio UI as a fallback while the custom frontend is validated.
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
## v24 — Custom UI shell + progress API skeleton
|
| 254 |
-
|
| 255 |
-
- Added a custom product UI shell served at `/custom` with dedicated HTML/CSS/JS assets.
|
| 256 |
-
- Added a live job progress visualization model based on `events.jsonl`.
|
| 257 |
-
- Added `/api/app-info`, `/api/progress/from-events`, and a placeholder `/api/runs` endpoint for the upcoming custom frontend auth bridge.
|
| 258 |
-
- Added a Custom UI preview tab while preserving the functional Gradio workflows as the source of truth.
|
| 259 |
-
- Added tests for the custom shell assets and progress mapping.
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
## V23 — Hardware-at-creation strategy
|
| 263 |
-
|
| 264 |
-
- Requests Space hardware as early as possible via `create_repo(..., space_hardware=...)`.
|
| 265 |
-
- Falls back through ZeroGPU → preferred hardware → fixed GPU fallback before creating a default CPU Space.
|
| 266 |
-
- Writes `hardware_strategy.json` alongside `hardware_attempts.json`.
|
| 267 |
-
- Stops treating OAuth hardware errors as transient retries; if automatic hardware is not authorized, the run is marked `manual_hardware_required` and the user can validate after manual hardware selection.
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
## V21 — Per-user bucket onboarding
|
| 271 |
-
|
| 272 |
-
- Added Run storage controls to check or create the signed-in user's private run bucket from the UI.
|
| 273 |
-
- Jobs now preflight the per-user bucket before launch and show a clear error if it is missing or inaccessible.
|
| 274 |
-
- The app no longer requires users to leave the workflow to manually create `space-factory-runs` before first use.
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
## v20 — Per-user Bucket isolation
|
| 278 |
-
|
| 279 |
-
- Reverted to the V17 product UI baseline.
|
| 280 |
-
- Replaced the hardcoded shared bucket source with a per-user bucket policy.
|
| 281 |
-
- Jobs now mount `<signed-in-username>/<bucket-name>` dynamically.
|
| 282 |
-
- Refresh/readback and artifacts links now use the signed-in user's bucket.
|
| 283 |
-
- Added a Run Bucket name field to Build and Validate workflows.
|
| 284 |
-
- Updated docs to require each user to create their own private `space-factory-runs` bucket.
|
| 285 |
-
|
| 286 |
-
## v28 — Custom UI live polish
|
| 287 |
-
|
| 288 |
-
- Added Run Explorer status filters and a manual refresh action.
|
| 289 |
-
- Persisted the active run in browser localStorage so progress resumes after refresh.
|
| 290 |
-
- Added a non-blocking polling warning when live progress cannot be refreshed.
|
| 291 |
-
- Highlighted the selected run row in the explorer.
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
## v17-product-button-links
|
| 295 |
-
|
| 296 |
-
- Replaced custom HTML/Markdown quick links with native Gradio `gr.Button(link=..., link_target="_blank")` controls.
|
| 297 |
-
- Quick link buttons are available in both public workflows:
|
| 298 |
-
- Build from model card
|
| 299 |
-
- Validate existing Space
|
| 300 |
-
- Kept the product workflow unchanged: ZeroGPU-first, fixed GPU fallback, manual hardware fallback, and existing-Space validation.
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
## v16-product-links
|
| 304 |
-
|
| 305 |
-
- Added quick links after launching jobs:
|
| 306 |
-
- open HF Job in a new tab
|
| 307 |
-
- open target Space in a new tab
|
| 308 |
-
- open Space settings in a new tab
|
| 309 |
-
- open run artifacts in the configured Bucket
|
| 310 |
-
- Added the same link panel to both Build and Validate workflows.
|
| 311 |
-
|
| 312 |
-
## v15-product-verified
|
| 313 |
-
|
| 314 |
-
- Removed legacy phase launchers from product code.
|
| 315 |
-
- Kept only the public workflows:
|
| 316 |
-
- Build from model card
|
| 317 |
-
- Validate existing Space
|
| 318 |
-
- Cleaned documentation to match the public-preview product workflow.
|
| 319 |
-
- Removed duplicate UI component in the build events tab.
|
| 320 |
-
- Rechecked previously observed failure modes:
|
| 321 |
-
- Gradio Client auth parameter compatibility
|
| 322 |
-
- endpoint discovery instead of hardcoded `/predict`
|
| 323 |
-
- generic README metadata sanitation
|
| 324 |
-
- ZeroGPU-first with fixed-GPU/manual fallback
|
| 325 |
-
- separate validation/smoke-test workflow
|
| 326 |
-
|
| 327 |
-
## v14-product
|
| 328 |
-
|
| 329 |
-
- Public product UI without experimental tabs.
|
| 330 |
-
- Universal model-card builder and existing-Space validator.
|
| 331 |
-
|
| 332 |
-
## V22 — dependency compatibility and build repair
|
| 333 |
-
|
| 334 |
-
- Removed the obsolete generated-Space constraint `huggingface_hub<1.0.0`.
|
| 335 |
-
- Generated Spaces now normalize Hub requirements to a modern compatible range (`huggingface_hub>=0.34.0,<2.0.0`, or `>=1.5.0,<2.0.0` when Transformers 5.x is detected).
|
| 336 |
-
- Added one automatic Pi repair pass when the generated Space fails build/runtime validation.
|
| 337 |
-
- The repair pass collects Space build/runtime logs, asks Pi for a minimal patch, reuploads the workspace, and retries validation once.
|
| 338 |
-
- Repair artifacts are stored under `runs/<run_id>/repair/` and logs under `logs/pi_repair_output.txt`.
|
| 339 |
-
|
| 340 |
-
## v27 — Custom run actions workflow
|
| 341 |
-
|
| 342 |
-
- Adds selected-run actions in the custom Run Explorer.
|
| 343 |
-
- Adds a manual hardware action panel in live progress.
|
| 344 |
-
- Lets users prepare the Validate existing Space form directly from a selected run.
|
| 345 |
-
- Keeps the Gradio fallback UI and backend workflow unchanged.
|
| 346 |
-
|
| 347 |
-
## v26-custom-run-explorer
|
| 348 |
-
|
| 349 |
-
- Expanded the custom UI Run Explorer from a simple list into a usable run-detail view.
|
| 350 |
-
- Added per-run detail rendering for status, model, target Space, hardware, validation result, artifacts, and report preview.
|
| 351 |
-
- Enhanced `/api/runs/{run_id}` and `/api/runs/{run_id}/progress` to expose `inference_gate`, `generation_smoke`, `hardware_strategy`, `technical_blockers`, file indexes, and normalized run summaries.
|
| 352 |
-
- Added frontend rendering for validation metrics sourced from live progress and smoke-test artifacts.
|
| 353 |
-
- Kept the Gradio fallback UI and core backend workflows unchanged.
|
| 354 |
-
|
| 355 |
-
## v37 — Premium simplified custom UI
|
| 356 |
-
|
| 357 |
-
- Simplified the Custom UI navigation to the two real product workflows: **Run build** and **Test Space**.
|
| 358 |
-
- Kept the Run Explorer visible on the build dashboard instead of exposing it as a redundant tab.
|
| 359 |
-
- Reworked the dashboard layout to feel closer to the validated premium mockup while reducing confusion.
|
| 360 |
-
- Replaced ambiguous timeline dots with explicit step states: completed / active / pending / failed.
|
| 361 |
-
- Fixed run artifact links to consistently target the run folder: `runs/<run_id>` inside the connected bucket.
|
| 362 |
-
- Reduced persistent banners: success/info messages now auto-clear and the OAuth OK state is reflected in the header instead of a permanent banner.
|
| 363 |
-
- Preserved the Docker/FastAPI Custom UI architecture, OAuth flow, per-user buckets, build Jobs, validation Jobs, and live polling.
|
| 364 |
-
|
| 365 |
-
## V38 — Build/run separation and faster Run Explorer
|
| 366 |
-
|
| 367 |
-
- Added an explicit **Prepare new build** action to separate the fresh build form from selected past runs.
|
| 368 |
-
- Added a build mode notice explaining that selecting a run only changes progress/details and never mutates the build form.
|
| 369 |
-
- Run Explorer filters and search now operate locally from a cached run list for a much snappier interaction.
|
| 370 |
-
- Refresh now explicitly reloads the connected bucket; ordinary filter/search changes no longer re-query the bucket.
|
| 371 |
-
- Selecting a run highlights it, switches the detail/progress context, and keeps the build form independent.
|
| 372 |
-
|
| 373 |
-
## V42 — Product tabs and run recovery hardening
|
| 374 |
-
|
| 375 |
-
- Renamed the custom UI top-level workflow tabs to the intended product model: **New Build**, **Live Progress**, and **Space Test**.
|
| 376 |
-
- Kept the build form isolated from selected historical runs; selecting a run only updates Live Progress and details.
|
| 377 |
-
- Hardened run discovery from the connected bucket by combining `ls` and targeted `glob` patterns so partial/in-progress runs are recovered more reliably.
|
| 378 |
-
- Persisted `launch.json`, `summary.json`, and a minimal `state.json` immediately after a Job launch, so running Jobs appear in the Run Explorer before the worker writes final artifacts.
|
| 379 |
-
- Progress polling now falls back to launch metadata when `state.json`/`events.jsonl` are not ready yet.
|
| 380 |
-
- Job links are preserved or reconstructed from launch metadata for active and historical runs.
|
| 381 |
-
|
| 382 |
-
## v43 — Canonical run view model + mockup-oriented dashboard
|
| 383 |
-
|
| 384 |
-
- Added a canonical Run View Model that normalizes heterogeneous worker/bucket statuses into stable product states.
|
| 385 |
-
- Added `/api/runs/resumable` and `/api/runs/{run_id}/view` endpoints for bucket-led recovery and UI rendering.
|
| 386 |
-
- Enriched `/api/runs/{run_id}/progress` with the new `view` payload while preserving the previous progress contract.
|
| 387 |
-
- Reworked the custom UI toward the product mockup: sidebar, run summary header, product pipeline stepper, agent activity feed, diagnostics panel, and Space Test preview.
|
| 388 |
-
- Added explicit tests for running, manual hardware, success, stale, and resumable run selection states.
|
| 389 |
-
|
| 390 |
-
## v115 — remove obsolete resume-latest header action
|
| 391 |
-
|
| 392 |
-
- Removed the obsolete top-bar **Resume latest run** button now that the Run Explorer and cached run selection are the canonical recovery/navigation workflow.
|
| 393 |
-
- Removed the related frontend click handlers and hidden support element so no dead header action remains.
|
| 394 |
-
- Updated regression tests to assert the button stays absent while preserving the backend resumable endpoint for compatibility.
|
| 395 |
-
|
| 396 |
-
## v113 — clean UI fixes, faster run reloads, and clearer validation endpoints
|
| 397 |
-
|
| 398 |
-
- Fixed the build gate after a successful model pre-scan and made the target Space name optional; empty names now rely on backend auto-generation from the run ID.
|
| 399 |
-
- Simplified the Billing & compute card to a compact payment/dashboard reminder instead of a dense pseudo-quota panel.
|
| 400 |
-
- Reworked primary run events to use compact coded icons (`PI`, `API`, `TR`, `GPU`, etc.) instead of emoji.
|
| 401 |
-
- Improved Gradio endpoint rendering with endpoint input/output details, clearer parameter chips, and a clearer `Set API name` action.
|
| 402 |
-
- Added an in-memory run-detail cache so selecting a previously loaded run immediately rehydrates the correct central panel while optional network refresh continues.
|
| 403 |
-
- Polished Runs Explorer cards with a cleaner premium layout, explicit metadata rows, isolated delete action, and stronger truncation behavior.
|
| 404 |
-
|
| 405 |
-
## v127 — Billing usefulness + UI event/timeline audit
|
| 406 |
-
|
| 407 |
-
- Reworked the Billing & compute card into an actionable compute checklist: payment readiness, Pi Inference Providers, build Job cost, generated Space hardware and high-tier GPU guardrails.
|
| 408 |
-
- Kept exact spend/quotas delegated to the Hugging Face Billing dashboard instead of inventing usage totals.
|
| 409 |
-
- Audited JS event bindings for one-shot/delegated listeners across navigation, run rows and timeline scroll.
|
| 410 |
-
- Reduced timeline auto-scroll churn: identical timeline renders no longer force keep-visible scrolling after user interaction.
|
| 411 |
-
- Confirmed run selection keeps the immediate cached/optimistic render path before network hydration.
|
| 412 |
|
|
|
|
|
|
| 1 |
+
# v164 — Premium Timeline Refactor
|
| 2 |
|
| 3 |
+
- Reworked the Active Run timeline as a premium, single-row milestone system with clockwise partial rings for grouped substeps.
|
| 4 |
+
- Renamed user-facing timeline labels where helpful while retaining worker-step precision underneath.
|
| 5 |
+
- Kept Agent recovery and Run traces roles from v158/v159; v120 Agent recovery remains documented and visible as the operational recovery summary.
|
| 6 |
+
- Reduced redundant terminal Failure milestone: precise failed stages are marked directly, with Failure only as a fallback terminal anchor.
|
| 7 |
|
| 8 |
+
Validation: 452 tests pass.
|
| 9 |
|
| 10 |
+
# v163 — Section Harmony Audit
|
| 11 |
|
| 12 |
+
- Reviewed the one-page UI section by section for state ownership, event-handler conflicts and cross-panel interference.
|
| 13 |
+
- Fixed duplicate DOM IDs in the support/compatibility area so hidden legacy elements no longer shadow visible Active Run hardware fields.
|
| 14 |
+
- Separated Space Test's visible “Started at” field from the Active Run polling compatibility field. Active Run progress no longer writes into the Space Test timestamp.
|
| 15 |
+
- Hardened Run traces document state so backend-provided `present: true` document links are not downgraded when a light payload lacks a `files` listing.
|
| 16 |
+
- Added regression tests covering unique DOM IDs, Active Run vs Space Test timestamp separation, hidden-field compatibility boundaries, and stable Run traces document presence.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
Validation: 448 tests pass.
|
README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Agentic Space Factory
|
| 3 |
sdk: docker
|
|
@@ -231,3 +235,13 @@ Repair mode is intentionally strict: it must preserve the original model and rea
|
|
| 231 |
- Reduced timeline auto-scroll churn: identical timeline renders no longer force keep-visible scrolling after user interaction.
|
| 232 |
- Confirmed run selection keeps the immediate cached/optimistic render path before network hydration.
|
| 233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Agentic Space Factory
|
| 2 |
+
|
| 3 |
+
- **v161** fixes duplicate delete modal triggers and stuck `Deleting…` states with single-flight delete guards.
|
| 4 |
+
|
| 5 |
---
|
| 6 |
title: Agentic Space Factory
|
| 7 |
sdk: docker
|
|
|
|
| 235 |
- Reduced timeline auto-scroll churn: identical timeline renders no longer force keep-visible scrolling after user interaction.
|
| 236 |
- Confirmed run selection keeps the immediate cached/optimistic render path before network hydration.
|
| 237 |
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
### Active Run source documents
|
| 241 |
+
|
| 242 |
+
Run traces now renders as a horizontal document dock: compact source-file icons for Pi traces, repair decisions, reports, smoke results, and blockers. Agent recovery remains the human-readable recovery summary; the dock is the raw source-file vault.
|
| 243 |
+
|
| 244 |
+
|
| 245 |
+
## v164 timeline
|
| 246 |
+
|
| 247 |
+
The Active Run timeline uses compact product milestones backed by exact worker steps. Grouped milestones expose clockwise partial progress rings and substep counts, while recovery details remain in Agent recovery and source files remain in Run traces.
|
app.py
CHANGED
|
@@ -354,6 +354,7 @@ def register_custom_routes(fastapi_app: FastAPI) -> None:
|
|
| 354 |
preferred_space_hardware=payload.get("preferred_space_hardware"),
|
| 355 |
fallback_space_hardware=payload.get("fallback_space_hardware"),
|
| 356 |
allow_fixed_gpu_fallback=bool(payload.get("allow_fixed_gpu_fallback", True)),
|
|
|
|
| 357 |
implementation_mode=payload.get("implementation_mode"),
|
| 358 |
expected_output_type=payload.get("expected_output_type"),
|
| 359 |
run_id=payload.get("run_id"),
|
|
@@ -751,6 +752,7 @@ def launch_universal_model_card_job_ui(
|
|
| 751 |
pi_model: str,
|
| 752 |
preferred_hardware: str,
|
| 753 |
allow_fixed_gpu_fallback: bool,
|
|
|
|
| 754 |
fallback_hardware: str,
|
| 755 |
implementation_mode: str,
|
| 756 |
bucket_name: str,
|
|
@@ -772,6 +774,7 @@ def launch_universal_model_card_job_ui(
|
|
| 772 |
preferred_space_hardware=preferred_hardware,
|
| 773 |
fallback_space_hardware=fallback_hardware,
|
| 774 |
allow_fixed_gpu_fallback=allow_fixed_gpu_fallback,
|
|
|
|
| 775 |
implementation_mode=implementation_mode,
|
| 776 |
run_id=run_id,
|
| 777 |
bucket_name=bucket_name,
|
|
@@ -936,6 +939,7 @@ Paste a Hugging Face model ID or model-card URL. The worker creates a **private*
|
|
| 936 |
value="zero-a10g",
|
| 937 |
info="ZeroGPU is attempted first. Automatic fallback avoids high/restricted tiers such as A100/H200; select them manually in Space Settings only if your account is allowed.",
|
| 938 |
)
|
|
|
|
| 939 |
allow_fallback = gr.Checkbox(label="Allow fixed GPU fallback", value=True)
|
| 940 |
fallback_hw = gr.Dropdown(
|
| 941 |
label="Fallback Space hardware",
|
|
@@ -958,7 +962,7 @@ Paste a Hugging Face model ID or model-card URL. The worker creates a **private*
|
|
| 958 |
|
| 959 |
build_btn.click(
|
| 960 |
fn=launch_universal_model_card_job_ui,
|
| 961 |
-
inputs=[build_run_id, model_id, target_space_name, pi_model, preferred_hw, allow_fallback, fallback_hw, implementation_mode, global_bucket_name],
|
| 962 |
outputs=[
|
| 963 |
build_run_id,
|
| 964 |
build_job_id,
|
|
|
|
| 354 |
preferred_space_hardware=payload.get("preferred_space_hardware"),
|
| 355 |
fallback_space_hardware=payload.get("fallback_space_hardware"),
|
| 356 |
allow_fixed_gpu_fallback=bool(payload.get("allow_fixed_gpu_fallback", True)),
|
| 357 |
+
try_zero_gpu_first=bool(payload.get("try_zero_gpu_first", True)),
|
| 358 |
implementation_mode=payload.get("implementation_mode"),
|
| 359 |
expected_output_type=payload.get("expected_output_type"),
|
| 360 |
run_id=payload.get("run_id"),
|
|
|
|
| 752 |
pi_model: str,
|
| 753 |
preferred_hardware: str,
|
| 754 |
allow_fixed_gpu_fallback: bool,
|
| 755 |
+
try_zero_gpu_first: bool,
|
| 756 |
fallback_hardware: str,
|
| 757 |
implementation_mode: str,
|
| 758 |
bucket_name: str,
|
|
|
|
| 774 |
preferred_space_hardware=preferred_hardware,
|
| 775 |
fallback_space_hardware=fallback_hardware,
|
| 776 |
allow_fixed_gpu_fallback=allow_fixed_gpu_fallback,
|
| 777 |
+
try_zero_gpu_first=try_zero_gpu_first,
|
| 778 |
implementation_mode=implementation_mode,
|
| 779 |
run_id=run_id,
|
| 780 |
bucket_name=bucket_name,
|
|
|
|
| 939 |
value="zero-a10g",
|
| 940 |
info="ZeroGPU is attempted first. Automatic fallback avoids high/restricted tiers such as A100/H200; select them manually in Space Settings only if your account is allowed.",
|
| 941 |
)
|
| 942 |
+
try_zero_gpu_first = gr.Checkbox(label="Try ZeroGPU first", value=True)
|
| 943 |
allow_fallback = gr.Checkbox(label="Allow fixed GPU fallback", value=True)
|
| 944 |
fallback_hw = gr.Dropdown(
|
| 945 |
label="Fallback Space hardware",
|
|
|
|
| 962 |
|
| 963 |
build_btn.click(
|
| 964 |
fn=launch_universal_model_card_job_ui,
|
| 965 |
+
inputs=[build_run_id, model_id, target_space_name, pi_model, preferred_hw, allow_fallback, try_zero_gpu_first, fallback_hw, implementation_mode, global_bucket_name],
|
| 966 |
outputs=[
|
| 967 |
build_run_id,
|
| 968 |
build_job_id,
|