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 -
fix: suppress beta/gamma warnings globally and increase ensemble timeouts for CPU
aviseth- Move warning filters to module level (before imports) to catch all warnings - Increase per-model timeout from 10s to 20s for HF Spaces CPU - Increase total ensemble timeout from 15s to 30s - Prevents timeout failures on CPU-only inferencebb4a756 -
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: suppress tokenizer and model loading warnings on HF Spaces
aviseth- Set clean_up_tokenization_spaces=True explicitly on AutoTokenizer.from_pretrained() to silence the FutureWarning about the default changing in transformers v4.45 - Wrap AutoModelForSequenceClassification.from_pretrained() in warnings.catch_warnings() to suppress the UserWarning about beta/gamma parameter renames in XLNet LayerNorm layers - Import warnings stdlib module5412e6a
-
fix: f-string backslash syntax error in generate_explanation_text
aviseth69e2ee8
-
refactor: clean up inference.py, remove inline comments, extract _patch_xlnet_configs
avisethf2161c4 -
fix: use slow tokenizer for roberta to avoid tokenizer.json format incompatibility
aviseth2b9ff0f
-
fix: remove train/evaluate imports from __init__, pin tokenizers==0.19.1
aviseth0d705bd -
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 -
fix: smart MODELS_DIR path resolution for Docker
avisetheca2087
-
fix: remove deprecated use_cache from xlnet config
aviseth8214774 -
chore: clean up preload log message
aviseth768396a -
fix: patch xlnet tokenizer_config at runtime
avisethe83ba6b -
fix: preload models synchronously
aviseth2d86a2c -
fix: sync latest inference and api fixes
aviseth45f4b13 -
fix: Python 3.9 compat list[dict] type hints
avisethc5c3134 -
fix: preload all models at startup
aviseth5188693 -
fix: evict model cache to prevent OOM
avisethb8be780 -
fix: remove syntax error in xlnet inference
aviseth2f435d5 -
fix: xlnet list fields in _token_importance
avisethd08d3f2 -
fix: xlnet tokenizer list fields
aviseth7ff3220 -
fix: distilbert token_type_ids and xlnet inference errors
avisetheede205 -
Initial deployment
06e73d2