Buckets:
77.4 kB
40 files
Updated 9 days ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| .claude | 1 items | ||
| 20260506T125748Z-9fdf4ee4 | 14 items | ||
| 20260506T132411Z-acca0806 | 11 items | ||
| 20260507T100015Z-30e9eb3f | 13 items | ||
| README.md | 2.55 kB xet | f587d42d |
Space Doctor
Space Doctor is an end-to-end Hugging Face agent to fix broken Spaces. It works on following steps:
- Inspect a Gradio Space with
hf. - Reproduce failures locally or with an HF Job.
- Diagnose common Gradio / ZeroGPU issues.
- Store logs, patches, reports, and postmortems as artifacts.
- Copy native Codex / Claude Code / Pi traces for upload to a Hub dataset.
- Optionally sync artifacts to an HF bucket and open a Space PR.
- Hand off the trace and artifact bundle so another agent can continue.
The Hub trace viewer auto-detects native agent session JSONL files. Space Doctor
also writes a compact space_doctor_events.jsonl, but the native agent session
is the important file to upload for the trace viewer.
Quickstart
Run the included broken sample:
cd /Users/mervenoyan/space-doctor
PYTHONPATH=src python3 -m space_doctor.cli run \
--local-space-dir examples/broken-llava-space \
--out-dir runs \
--apply-known-fixes \
--copy-latest-codex-trace
Inspect the output:
open runs/<run-id>/artifacts/report.md
open runs/<run-id>/artifacts/postmortem.md
open runs/<run-id>/artifacts/patches/suggested.patch
Use the handoff view:
PYTHONPATH=src python3 -m space_doctor.cli resume runs/<run-id>/artifacts/space_doctor_events.jsonl
Debug A Real Space
Dry-run mode is the default. It creates upload commands without pushing.
PYTHONPATH=src python3 -m space_doctor.cli run \
--space-id <namespace>/<space-name> \
--out-dir runs \
--apply-known-fixes \
--artifact-bucket <namespace>/space-doctor-artifacts \
--trace-dataset <namespace>/space-doctor-traces \
--copy-latest-codex-trace
Actually push artifacts, traces, and a PR:
PYTHONPATH=src python3 -m space_doctor.cli run \
--space-id <namespace>/<space-name> \
--out-dir runs \
--apply-known-fixes \
--create-pr \
--artifact-bucket <namespace>/space-doctor-artifacts \
--trace-dataset <namespace>/space-doctor-traces \
--copy-latest-codex-trace \
--push
HF Job Reproduction
Submit a small remote check:
PYTHONPATH=src python3 -m space_doctor.cli run \
--local-space-dir examples/broken-llava-space \
--run-hf-job \
--hf-job-flavor cpu-basic
For Spaces requiring Hub access, pass HF_TOKEN to the job as a secret when you
adapt the generated reproduction script.
Multimodal Asset Factory
The companion runbook is in docs/multimodal-asset-factory.md.
PYTHONPATH=src python3 -m space_doctor.cli asset-factory-steps
- Total size
- 77.4 kB
- Files
- 40
- Last updated
- May 7
- Pre-warmed CDN
- US EU US EU