Commit History
-
fix(critical): align saison/peak_hour encoding + restore TensorFlow on HF
cheikhaidev-ui +1: Claude Sonnet 4.6- utils_simple.create_time_features(): fix saison from binary {0,1} to 3-season Dakar encoding {0,1,2} matching data_generator.get_season() - utils_simple.create_time_features(): fix is_peak_hour to include 7-9h morning peak matching data_generator.is_peak_hour() - requirements-hf.txt: restore tensorflow-cpu==2.17.1 so LSTM loads on HF Spaces (previously removed to avoid build timeout) - Dockerfile: remove outdated comment about missing TensorFlow - CLAUDE.md: document correct saison and is_peak_hour invariants Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>554fba2 -
chore(app): remove unused QUARTIER_ADJUSTMENT import
cheikhaidev-ui +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6273b40 -
refactor(map): extract compute_map_risks() from tab2 inline logic
cheikhaidev-ui +1: Claude Sonnet 4.6Move vectorized batch prediction for all quartiers into a reusable compute_map_risks() function in utils_simple.py and replace the 18-line inline block in tab2 with a single call. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>9a0b5bd -
fix: correct record count from 70,001 to 70,000 in app and CLAUDE.md
cheikhaidev-ui +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>498ea04 -
fix(map): add disclaimer caption for Pikine and Fann estimates
cheikhaidev-ui +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>915dfb0 -
fix(quartiers): normalize Guédiawaye accent across config and rename map
cheikhaidev-ui +1: Claude Sonnet 4.6Add 'Guediawaye' → 'Guédiawaye' to _QUARTIER_RENAME in app.py and update all three occurrences in src/config.py (QUARTIERS_DAKAR, COORDONNEES_QUARTIERS, QUARTIER_ADJUSTMENT) for consistency. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>8fd2116
-
fix(map): apply 5% risk floor on map + interpolate temporal chart gaps
cheikhaidev-uic0e7040 -
fix(predictions): add 5% risk floor + calibrate charts + update README
cheikhaidev-ui- fix(predictions): add minimum 5% risk floor (residual network risk) - fix(chart): raise temporal filter threshold to 400 MW to remove empty weeks - fix(forecast): fix precipitation Y-axis range [0-20mm] - fix(forecast): fix temperature Y-axis range [20-45C] for Dakar context - docs(readme): correct quartier names, update author title, add weather API featured6ea9c6 -
fix(ux): auto map + hour slider + dark theme + data fixes
cheikhaidev-ui- fix(map): remove button gate, map now auto-renders on parameter change - fix(predictions): add hour slider (0-23) to control is_peak_hour correctly - fix(map): carte updates dynamically with all sidebar parameters - fix(weather): clamp precipitation to 0 (no negative values) - fix(chart): filter empty weeks in temporal chart (conso > 100 MW) - feat(theme): add Streamlit dark theme with red primary colore49e56b
-
fix(charts): weekly aggregation + contextual annotations
cheikhaidev-ui- fix(temporal): replace random 1000-sample with weekly resample (reproducible, readable) - fix(stats): add annotation on 18-22h peak (SENELEC context) - fix(stats): add annotation on Dec/Feb anomaly (synthetic dataset limitation)472a145 -
feat(v2): SENELEC dashboard + 7-day forecast + fixed quartier names
cheikhaidev-ui- feat(stats): add 4 KPI metrics (total outages, highest risk area, avg rate, avg temp) - feat(stats): add hourly risk lineplot + monthly risk barplot - feat(forecast): add 7-day weather forecast chart (temp + precipitation) - fix(data): normalize quartier names with accents at CSV load (Sicap-Liberté, Mermoz-Sacré-Coeur)09a6a42 -
feat(v2): add real-time weather API + improved map colors
cheikhaidev-ui- feat(weather): integrate Open-Meteo API for real Dakar weather data - feat(sidebar): add weather button to auto-fill sliders with live data - feat(map): colored markers by risk level (green/orange/red), size=20, zoom=11 - Live test: Dakar 25.2C, 82% humidity, 7.4 km/h windd248d81 -
fix(docker): remove tensorflow from HF build to fix 30min timeout
cheikhaidev-ui- Add requirements-hf.txt without tensorflow for Docker/HF deployment - Make keras/tensorflow import optional in utils_simple.py - LightGBM-only mode when TF unavailable (graceful degradation) - Local dev keeps tensorflow-cpu==2.17.1 via requirements.txtc27655a
-
feat: add notebooks, badges, and eliminate classify_risk duplications (batch 4/4)
cheikhaidev-ui- feat(notebooks): add 01_EDA.ipynb (7 cells: distributions, correlations, temporal patterns) - feat(notebooks): add 02_model_evaluation.ipynb (11 cells: metrics, ROC, confusion matrix, feature importance) - refactor(app): replace 6 inline risk classification expressions with classify_risk() - docs(readme): add CI badge and HF Spaces live badge (5 badges total)a408d59 -
perf: vectorize data generation and batch map predictions (batch 2/3)
cheikhaidev-ui- perf(data_generator): replace 52,560-iter Python loop with numpy vectorized ops (~20-50x faster) - perf(supabase): replace iterrows() with to_dict('records'), add timeout=30, exponential backoff on error - perf(app): batch 8 map predictions into single numpy matrix call (8x fewer model invocations) - fix(app): initialize results=[] before model availability check to prevent NameError1c045e4 -
refactor: improve code quality (batch 1/3)
cheikhaidev-ui- feat(config): add classify_risk() function with type hints, eliminates 5 duplications - refactor(app): replace wildcard import with 8 explicit named imports - fix(utils): replace global warnings.filterwarnings with targeted keras/lightgbm filters - chore(src): remove dead MySQL config from __init__.py - fix(error-handling): replace 4 bare except: with except Exception as e + loggingf76db68 -
fix: correct critical feature encoding bugs + retrain models
cheikhaidev-ui +1: Claude Sonnet 4.6BREAKING FIX: silent wrong predictions in production resolved - fix(inference): align saison encoding with training CSV (binary 0/1, pluies=Jun-Aug) - fix(inference): align is_peak_hour with training CSV (18-22h, evening only) - fix(inference): remove invalid predict_proba fallback on lgb.Booster - fix(config): harmonize quartier names with accents (Sicap-Liberté, Mermoz-Sacré-Cœur) - fix(config): remove module-level print() causing UnicodeEncodeError on Windows - chore(deps): upgrade tensorflow-cpu 2.15.0 → 2.17.1 (Python 3.12 support) - chore(models): retrain LightGBM (87.42%) and LSTM (87.31%) with corrected encodings Audit performed by Claude Code — 22 issues found, 4 critical bugs fixed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>3e4b260
-
Initial commit - code only
5cda98e