How codeasarjun/ecogrid-demand-ops works
EcoGrid-Demand-Ops is a demand-forecasting MLOps application. Its documented workflow runs drift monitoring before retraining: Prefect halts when drift is detected, otherwise it trains a Random Forest, records metrics in MLflow, and saves weights for the FastAPI inference service. The graph also shows configuration and the prediction interface. The monitor source currently builds synthetic baseline and live data rather than reading the repository CSVs; implementation details beyond the sampled files are not inferred.
Main entry points: app_server.py FastAPI service · pipeline_train.py Grid model training · orchestrator.py Prefect workflow · pipeline_monitor.py Drift assessment
Components 12
Orchestration
- Prefect workflow
src/orchestrator.py
Drift Monitoring
- Drift assessment
src/pipeline_monitor.py
Model Training
- Grid model training
src/pipeline_train.py - Runtime settings
src/config.py - MLflow ledger
- Serialized model
Inference Serving
- FastAPI service
src/app_server.py - Validated payload
src/app_server.py - Load forecast
src/app_server.py
Other components
- Pipeline operator
- Sensor telemetry
- Inference caller
Connections 14
- Pipeline operator → Prefect workflow: starts flow
README.md - Prefect workflow → Drift assessment: runs check
src/orchestrator.py - Drift assessment → Runtime settings: reads settings
src/pipeline_monitor.py - Sensor telemetry → Drift assessment: provides telemetry
README.md - Drift assessment → Prefect workflow: returns drift result
src/orchestrator.py - Prefect workflow → Grid model training: runs if clear
src/orchestrator.py - Grid model training → Runtime settings: reads settings
src/pipeline_train.py - Grid model training → MLflow ledger: logs run
src/pipeline_train.py - Grid model training → Serialized model: saves weights
src/pipeline_train.py - Inference caller → FastAPI service: submits query
README.md - FastAPI service → Runtime settings: reads settings
src/app_server.py - FastAPI service → Serialized model: loads weights
src/app_server.py - FastAPI service → Validated payload: validates input
src/app_server.py - FastAPI service → Load forecast: returns prediction
src/app_server.py