Spaces:
Sleeping
Sleeping
Commit History
14 days ago
-
fix: resolve FAILED state on HF Space startup
Root causes: 1. device='auto' passed directly to model.to('auto') — PyTorch does not accept 'auto' as a device string. Fixed: _resolve_device() helper in clap.py and e5.py resolves 'auto' -> 'cuda' (if available) else 'cpu'. 2. CLAP_MODEL_REVISION and E5_MODEL_REVISION env vars were not set in HF Space Variables — both defaulted to 'main', triggering the fail-fast pinning check (allow_unpinned_models=false). Fix: set the vars in HF Space Variables (see below). Verified SHA: laion/clap-htsat-fused 365dea6ef167def6676140ed93bbc43f84dabb28 intfloat/multilingual-e5-small 614241f622f53c4eeff9890bdc4f31cfecc418b3 Other improvements: - Bind resolved SHA into audio_embedding_version / text_embedding_version after load so embedding_version is deterministic per model pin. - Startup log confirms: CLAP loaded once, CLAP text encoder used for taxonomy (NOT E5), device, SHA, version strings. - Fix test_emotion_no_e5_dependency: check E5TextEmbeddingProvider …c3067fb
15 days ago
-
feat: implement owlsonic-ml-worker
- Add stateless ML inference worker (worker/) - ClapAudioEmbeddingProvider: audio embeddings via laion/clap-htsat-fused - ClapZeroShotEmotionProvider: zero-shot emotion via shared CLAP text encoder - E5TextEmbeddingProvider: lyrics/text embeddings via multilingual-e5-small - WorkerService: concurrency gate, request lifecycle, timings - Worker API: /health/live, /health/ready, /v1/capabilities, /v1/audio/embeddings, /v1/emotions/from-audio-embeddings, /v1/text/embeddings - Fix critical bugs found in code review - C-1: isinstance on factory functions -> isinstance(e, WorkerError) - C-2: guard service.load_models() when service is None; fix missing return app when enable_legacy_api=False - C-3: lazy-import legacy modules (torch, application.py) only when OWLSONIC_ENABLE_LEGACY_API=true - Fix correctness issues - H-1: enforce L2 normalization of input embedding in _compute_scores - H-2: prepend E5 'query: ' prefix to every chunk, not just the whole text …37a9a36
-
emotion
86127bb -
emotion
bf521ca
-
fix
0b7bc1e -
fix
c00df26 -
lirics+testing
8494801
-
fix
bff0fe1
-
update
330f477