How everlynmartins/adaptive-predictive-maintenance-platform works
This is an FD001 predictive-maintenance demonstrator: a simulator replays a unit’s telemetry, and the serving workflow applies a selected telemetry policy and frozen scientific artifacts to return cycle-by-cycle horizon risk and alerts. FastAPI persists operational predictions and alerts; Streamlit uses the API for serving and history. Separate scientific branches cover model training and evaluation, explainability and uncertainty, and telemetry-reduction experiments. The README documents the main service/API/persistence flow; some internal orchestration links are based on the README or SOURCE INDEX rather than complete source excerpts.
Main entry points: local_service.py Application service · records.py Prediction contracts · main.py FastAPI serving · cmapss.py C-MAPSS data
Components 25
Serving and operations
- Telemetry replay
src/predictive_maintenance/simulator/telemetry_producer.py - Streamlit dashboard
src/predictive_maintenance/ui/streamlit_app.py - API client
src/predictive_maintenance/ui/api_client.py - FastAPI serving
src/predictive_maintenance/api/main.py - Application service
src/predictive_maintenance/application/local_service.py - Operational persistence
src/predictive_maintenance/api/persistence.py
Scientific models
- Classical training
src/predictive_maintenance/application/classical_ml_fd001.py - Tree risk models
src/predictive_maintenance/models/ml/classical.py - Weibull baseline
src/predictive_maintenance/models/reliability/weibull.py - Discrete hazard
src/predictive_maintenance/models/temporal/discrete_hazard.py - TCN model
src/predictive_maintenance/models/temporal/tcn.py - Transformer model
src/predictive_maintenance/models/temporal/transformer.py - Anomaly diagnostics
src/predictive_maintenance/models/anomaly/isolation_forest.py - Probability fusion
src/predictive_maintenance/models/fusion/probabilistic.py
Data and telemetry
- Prediction contracts
src/predictive_maintenance/core/records.py - C-MAPSS data
src/predictive_maintenance/data/cmapss.py - Target construction
src/predictive_maintenance/data/targets.py - Unit-wise splitting
src/predictive_maintenance/data/splitting.py - Telemetry policies
src/predictive_maintenance/filtering/policies.py - Causal features
src/predictive_maintenance/features/causal.py
Evaluation and analysis
- FD001 analysis
src/predictive_maintenance/analysis/fd001.py - Explainability and uncertainty
src/predictive_maintenance/application/explainability_uncertainty_fd001.py - Telemetry experiments
src/predictive_maintenance/filtering/experiment.py
Other components
- Operator
- PostgreSQL
Connections 27
- Telemetry replay → FastAPI serving: replays scenarios
- Operator → Streamlit dashboard: selects scenario
- Streamlit dashboard → API client: uses adapter
src/predictive_maintenance/ui/streamlit_app.py - API client → FastAPI serving: requests serving
src/predictive_maintenance/ui/api_client.py - FastAPI serving → Application service: runs scenario
src/predictive_maintenance/api/main.py - Application service → Prediction contracts: uses contracts
src/predictive_maintenance/application/local_service.py - Application service → Telemetry policies: applies policy
- Application service → Causal features: loads features
src/predictive_maintenance/application/local_service.py - Application service → Tree risk models: loads artifacts
src/predictive_maintenance/application/local_service.py - Application service → Anomaly diagnostics: loads artifacts
src/predictive_maintenance/application/local_service.py - Application service → Probability fusion: uses frozen models
- FastAPI serving → Operational persistence: persists records
src/predictive_maintenance/api/main.py - Operational persistence → PostgreSQL: stores history
- FastAPI serving → Streamlit dashboard: serves results
- C-MAPSS data → Target construction: builds labels
- C-MAPSS data → Unit-wise splitting: provides units
- Classical training → Causal features: engineers inputs
src/predictive_maintenance/application/classical_ml_fd001.py - Classical training → Tree risk models: trains models
src/predictive_maintenance/application/classical_ml_fd001.py - Discrete hazard → Prediction contracts: returns predictions
src/predictive_maintenance/models/temporal/discrete_hazard.py - TCN model → Prediction contracts: returns predictions
src/predictive_maintenance/models/temporal/tcn.py - Transformer model → TCN model: reuses temporal code
src/predictive_maintenance/models/temporal/transformer.py - Probability fusion → Prediction contracts: combines risks
src/predictive_maintenance/models/fusion/probabilistic.py - FD001 analysis → C-MAPSS data: analyzes schema
src/predictive_maintenance/analysis/fd001.py - Explainability and uncertainty → Probability fusion: evaluates models
src/predictive_maintenance/application/explainability_uncertainty_fd001.py - Telemetry experiments → Telemetry policies: compares policies
src/predictive_maintenance/filtering/experiment.py - Telemetry policies → Prediction contracts: processes telemetry
src/predictive_maintenance/filtering/policies.py - Weibull baseline → Prediction contracts: returns predictions
src/predictive_maintenance/models/reliability/weibull.py