Spaces:
Sleeping
Sleeping
Commit History
-
fix: prevent dirty DB entries from mistyped model IDs; add cascading model delete
Alex W.Mistyped model names (e.g. "Meta-Llama-3-70B-intruct" missing an 's') were written to the DB immediately after quantization check, before any validation that the model actually exists on HuggingFace. This left orphan rows in the `models` table with no associated data, polluting Tab4/5/6. - Add `delete_model(conn, model_id, admin_token)`: - Verifies WRITE_TOKEN before any DB mutation - Counts rows in each table before deletion (for audit log) - Cascading delete in dependency order: layer_head_metrics → model_summary → components → models - Returns (success: bool, message: str) with per-table row counts - Move `upsert_model()` and `upsert_component()` from immediately after quantization check to AFTER `load_all_shard_headers()` succeeds - A mistyped model ID now hits HF 404 and returns early before any DB write - Added log line "💾 Model registered in DB: {model_id}" to make the write moment explicit and auditable - Add "🗑️ Delete Model" section between Model List and…c1b6928
-
feat(db+ui): add modality dimension & migrate legacy data
Alex W.Introduce `modality` (language/vision/audio) as a first-class dimension alongside the existing `layer_type` (standard/global), fixing misleading total_layers display for multi-modal models (Gemma-4 series). --- 1. `total_layers` mixed audio+vision+language into one number — meaningless for multi-modal models like gemma-4-31b-it. 2. Layer-type dropdown showed "standard/global" (structural concept) where users expected "language/vision/audio" (modality concept). 3. These two concepts (structure vs modality) were conflated in one field. --- - Add `modality TEXT DEFAULT 'language'` to `layer_head_metrics` - Add `modality TEXT DEFAULT 'language'` to `components` - Add `_migrate_add_modality()`: idempotent ALTER TABLE migration - Runs on every `init_db()` startup - Detects missing column via `PRAGMA table_info()` - Backfills legacy rows via keyword matching on `prefix` - vision: LIKE '%vision%' OR '%visual%' OR '%image%' - audio: LIKE '%audio%' OR '%speech%' OR '%acoust…0ff8a89
-
add 2 UI tabs.
Alex W.357d754