feat: HuggingFace model management tab #19

Merged
pyr0ball merged 1 commit from feat/hf-model-queue into main 2026-04-08 23:06:54 -07:00
Owner

Summary

  • New /api/models router: HF model lookup by repo ID, approval queue with JSONL persistence, SSE download progress via snapshot_download(), installed model listing, path-traversal-safe DELETE
  • pipeline_tag → adapter type mapping (zero-shot-classification → ZeroShotAdapter, sentence-similarity → RerankerAdapter, text-generation → GenerationAdapter)
  • 27 tests: all endpoints, duplicate detection, dismiss/re-queue, path traversal blocked
  • ModelsView.vue: HF lookup + add to queue, approval queue with Approve/Dismiss, live SSE download progress bars, installed model table with delete
  • Sidebar entry (🤗 Models) between Benchmark and Corrections

Test plan

  • pytest tests/test_models.py — 27/27 pass
  • Lookup a valid HF repo ID (e.g. cross-encoder/ms-marco-MiniLM-L-6-v2)
  • Verify adapter type is detected from pipeline_tag
  • Add to queue, verify appears as pending
  • Approve download, verify SSE progress bar appears
  • After download, verify appears in Installed section
  • Delete installed model, verify removed
  • Path traversal: DELETE /api/models/installed/../etc returns 400
## Summary - New `/api/models` router: HF model lookup by repo ID, approval queue with JSONL persistence, SSE download progress via `snapshot_download()`, installed model listing, path-traversal-safe DELETE - `pipeline_tag` → adapter type mapping (`zero-shot-classification` → ZeroShotAdapter, `sentence-similarity` → RerankerAdapter, `text-generation` → GenerationAdapter) - 27 tests: all endpoints, duplicate detection, dismiss/re-queue, path traversal blocked - `ModelsView.vue`: HF lookup + add to queue, approval queue with Approve/Dismiss, live SSE download progress bars, installed model table with delete - Sidebar entry (🤗 Models) between Benchmark and Corrections ## Test plan - [ ] `pytest tests/test_models.py` — 27/27 pass - [ ] Lookup a valid HF repo ID (e.g. `cross-encoder/ms-marco-MiniLM-L-6-v2`) - [ ] Verify adapter type is detected from pipeline_tag - [ ] Add to queue, verify appears as pending - [ ] Approve download, verify SSE progress bar appears - [ ] After download, verify appears in Installed section - [ ] Delete installed model, verify removed - [ ] Path traversal: `DELETE /api/models/installed/../etc` returns 400
pyr0ball added 1 commit 2026-04-08 22:32:55 -07:00
- New /api/models router: HF lookup, approval queue (JSONL persistence),
  SSE download progress via snapshot_download(), installed model listing,
  path-traversal-safe DELETE
- pipeline_tag → adapter type mapping (zero-shot-classification,
  sentence-similarity, text-generation)
- 27 tests covering all endpoints, duplicate detection, path traversal
- ModelsView.vue: HF lookup + add, approval queue, live download progress
  bars via SSE, installed model table with delete
- Sidebar entry (🤗 Models) between Benchmark and Corrections
pyr0ball merged commit 478a47f6e0 into main 2026-04-08 23:06:54 -07:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/avocet#19
No description provided.