Spaces:
Sleeping
Sleeping
Commit History
-
fix: run ensemble models sequentially on CPU for better performance
aviseth- Detect CPU vs GPU environment - Run models sequentially on CPU (avoids resource contention) - Run models in parallel on GPU (faster) - Increase total timeout to 180s for CPU sequential execution - Update error message with helpful suggestion - Fixes timeout issues on HuggingFace Spaces5684fb0
-
perf: optimize ensemble for CPU inference on HuggingFace Spaces
aviseth- Increase timeouts: 45s per model, 60s total (from 20s/30s) - Reduce max_length from 256 to 128 tokens for faster inference - Truncate input text to 2000 chars to reduce processing time - Use torch.inference_mode() instead of no_grad() for better performance - Update timeout error message to explain CPU limitations93a6c45
-
feat: improve ensemble voting with confidence weighting and per-class F1 scores
aviseth- Keep all 3 voting strategies display (hard/soft/weighted) - Soft voting now weights by model confidence (more confident models count more) - Weighted voting uses per-class F1 scores instead of overall accuracy - Add uncertainty metric (1 - max confidence) - Add model_agreement metric (% of models that agree) - Token merging weighted by class-specific F1 scores - Update all tests to include new metrics4cc1ba8 -
revert: restore 3 voting strategies display
avisethUser prefers seeing all 3 voting strategies (hard/soft/weighted) in the responsea6355a1 -
refactor: simplify ensemble voting to single smart strategy
aviseth- Replace 3 voting methods (hard/soft/weighted) with 1 smart_voting method - Use confidence-weighted predictions with per-class F1 scores - Add uncertainty and model_agreement metrics to results - Weight token explanations by class-specific F1 scores - Simplify API response structure (remove voting_strategies) - Update all tests to match new simplified structure - Minimalist approach for better user experiencec0e80a3 -
fix: suppress warnings at application startup
avisethbe0099d -
chore: remove documentation files
aviseth98a3c02 -
chore: clean up codebase - remove temp files and inline requirement comments
aviseth- Delete temporary test/migration scripts (run_migration.py, test_phase2_api.py) - Delete standalone test files (test_ensemble_integration.py, verify_ensemble.py) - Delete task verification report (TASK_1.3_VERIFICATION_REPORT.md) - Delete .hypothesis and .pytest_cache folders (test artifacts) - Remove inline requirement comments from main.py (e.g. 'Requirement 2.7') - Remove verbose inline explanations that clutter the code - Keep BUGFIX_REPORT.md as documentation of recent fixesc7bbb51 -
fix: resolve 6 critical ensemble and API issues
aviseth1. Remove redundant outer timeout on /predict/ensemble endpoint - ensemble.predict_ensemble() already has internal 15s timeout - Outer asyncio.wait_for was canceling coroutine mid-flight - Now allows graceful partial-result handling when models fail 2. Enforce per-model timeout in _predict_with_timeout - Was accepting timeout parameter but never using it - Now uses concurrent.futures.Future.result(timeout=X) - Prevents single slow model from blocking indefinitely 3. Fix hard_voting tie-breaking to be deterministic - When 3-way tie (all models predict different labels) - Now breaks tie by highest average confidence - Previously relied on dict iteration order (non-deterministic) 4. Fix primary_prediction.scores to show full distribution - Was only returning {winning_label: confidence} - Now returns full soft_voting_scores (all 4 classes) - Frontend can now display complete probability breakdown 5. Replace deprecated asyncio.get_event_loop() with ge…cb5302e
-
fix: default MODEL_NAMES to fine-tuned HF repos, fix .gitignore
aviseth4e491ac -
feat: Phase 1 enhancements - ensemble endpoint, history API, rate limiting, storage monitoring
aviseth1a5863d
-
chore: clean up preload log message
aviseth768396a -
fix: preload models synchronously
aviseth2d86a2c -
fix: sync latest inference and api fixes
aviseth45f4b13 -
fix: preload all models at startup
aviseth5188693 -
Initial deployment
06e73d2