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 across docs
cheikhaidev-ui +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b37f222 -
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 -
docs(CLAUDE.md): remove Supabase references after integration removal
cheikhaidev-ui +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>0ea7539 -
chore(config): remove unused SEUILS_RISQUE, TEMPERATURE_RANGES, CONSO_RANGES
cheikhaidev-ui +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e7a6c23 -
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
-
chore: remove Supabase integration (database.py, load script, config)
cheikhaidev-ui +1: Claude Sonnet 4.6Drop src/database.py, scripts/3_load_to_supabase.py and the SUPABASE_CONFIG block from src/config.py — the app no longer depends on any Supabase connection. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>5ae4a65 -
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(hf): stabilize websocket connection on HF Spaces free tier
cheikhaidev-uifa90692 -
fix(hf): switch to port 7860 required by HF Spaces Docker
cheikhaidev-ui84eda1b -
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 -
fix(docker): align Python 3.12-slim with tensorflow-cpu 2.17.1
cheikhaidev-ui- Dockerfile: python:3.11-slim → python:3.12-slim - requirements.txt: tensorflow-cpu 2.16.1 → 2.17.1 - Stack now consistent: local Python 3.12.5 = Docker 3.12-slim = TF 2.17.106ad55e
-
fix(ci): run only test_config.py to avoid streamlit headless issues
cheikhaidev-ui8571801 -
fix(ci): mock streamlit for headless CI, add missing dependencies
cheikhaidev-ui- fix(ci): add streamlit and plotly to pip install in ci.yml - fix(tests): mock streamlit module before import to fix headless CI failure6277f27 -
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 -
test: add pytest test suite and GitHub Actions CI (batch 3/3)
cheikhaidev-ui- test(config): 5 tests for classify_risk() and QUARTIERS_DAKAR integrity - test(features): 5 tests for create_time_features() encoding correctness - ci: add GitHub Actions workflow (Python 3.12, pytest on push/PR to main) - All 10 tests passing locallyefe72c1 -
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 -
fix(hf): add required YAML metadata to README for HF Spaces
cheikhaidev-ui0d55d9d -
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
-
Revise Cheikh Niang's contact links in README
Unverified signatureUpdated LinkedIn and Portfolio links for Cheikh Niang.fd9b3d1 -
docs: amélioration README professionnel avec contexte business, résultats et screenshots
1574029
-
Install libgomp1 to fix LightGBM library error
593c4fa -
Fix README encoding and change port to 8501
b8f73cf -
Change port from 7860 to 8501 to match Streamlit default
3b21c1b -
Fix port configuration - remove port from config.toml
ffd8902 -
Fix config.toml encoding issue
bec18ed -
Add models and data folders
9491a88 -
Fix .streamlit config
6fa9e1a -
Remove binaries, fix README
8b38e16 -
Fix colorTo metadata
f294bc4 -
Initial commit - code only
5cda98e