Spaces:
Sleeping
Sleeping
Add /jobs page (CI-style UI) + /community v0 stub
#1
by ArthurZ HF Staff - opened
What this adds
A second route on the Space — /jobs — exposes two operations powered by HfApi.run_uv_job:
- Request a new model: extracts emotion direction vectors for a target HF model via AidanZach/EmotionScope, writes them to
hf://buckets/HF-slyfox/emotion-vectors/<model_id>/. - Analyze traces: replays N session jsonls through a model, projects each turn's residual stream onto the emotion vectors, writes per-session parquet to
<source>/trace-analysis/<run_id>/.
UI is GitHub-Actions-style: colored status dots (queued/running/success/failed), live elapsed time, click-to-expand log viewer with 3 s refresh on expanded rows, 5 s poll on the list, cancel button while a job is running.
Existing /api/chats/* routes are unchanged.
Community v0
/communitypage placeholder +/api/community/runsstub reading fromHF-slyfox/community-index/runs/*.json. Empty until the publish-side flow inhf upload-traces --share communitylands.COMMUNITY.mddesign doc: consent tiers (private / org / community / training), phased rollout (catalog → remix → leaderboard → training-export → org governance).
API surface
POST /api/models/extract { model_id, flavor? }
POST /api/analyses { source, prefix?, n_traces, model_id, flavor? }
GET /api/jobs list slyfox-submitted jobs + live status
GET /api/jobs/{job_id} one job's record + live status
GET /api/jobs/{job_id}/logs tail of stdout/stderr
POST /api/jobs/{job_id}/cancel cancel
GET /api/community/runs opt-in public catalog
GET /jobs serves jobs.html
GET /community serves community.html
New files
jobs.html— CI-style jobs UI (428 lines, vanilla JS, no deps)community.html— v0 catalog placeholderCOMMUNITY.md— design doc
UV scripts referenced via raw GitHub URL live in huggingface/slyfox on the arthur-work branch under jobs_scripts/.
Notes
- Reads
SLYFOX_JOBS_REFfrom env (defaults toarthur-worksince slyfoxmainis not yet promoted). Switch tomainonce Arthur pushes. huggingface_hub>=1.7already in requirements; jobs API is onHfApidirectly so no new deps.
stevhliu changed pull request status to open
stevhliu changed pull request status to merged