How tchaikovsky29/bicycle-demand-prediction works
Bicycle Demand Prediction is an end-to-end MLOps system for training, promoting, serving, and monitoring bike-demand models. Its primary workflow is a Kubeflow training pipeline: ingest MongoDB data, validate and clean it, transform and split it, train and evaluate a model, then conditionally promote it. A separate inference transformer and drift detector support production serving and retraining. The training-stage wiring is visible in the pipeline source; inference, drift, and monitoring relationships are summarized from the README, so their implementation details are not inferred beyond that documentation.
Main entry points: training_pipeline.py Kubeflow training · data_ingestion.py Data ingestion · data_transformation.py Feature transformation · model_trainer.py Model training
Components 22
Training Pipeline
- Kubeflow training
src/pipeline/training_pipeline.py - Data ingestion
src/components/data_ingestion.py - Data validation
src/components/data_validation.py - Data cleaning
src/components/data_cleaning.py - Feature transformation
src/components/data_transformation.py - Model training
src/components/model_trainer.py - Model evaluation
src/components/model_evaluation.py - Model promotion
src/components/model_pusher.py
Data and Models
- Mongo data access
src/data_access/data.py - MongoDB connection
src/configuration/mongo_db_connection.py - Object storage access
src/configuration/aws_connection.py - Stage configuration
src/entity/config_entity.py - Shared utilities
src/utils/main_utils.py
Serving and Drift
- Inference transformer
src/pipeline/inference_transformer.py - KServe predictor
- Drift detection
drift_detection/drift_detector.py - Evidently
Tracking and Monitoring
- MLflow tracking
- Prometheus and Grafana
Other components
- Pipeline operator
- MongoDB
- MinIO / S3
Connections 39
- Pipeline operator → Kubeflow training: runs
README.md - Kubeflow training → Data ingestion: starts
src/pipeline/training_pipeline.py - Kubeflow training → Data validation: passes metadata
src/pipeline/training_pipeline.py - Kubeflow training → Data cleaning: passes dataset
src/pipeline/training_pipeline.py - Kubeflow training → Feature transformation: passes cleaned data
src/pipeline/training_pipeline.py - Kubeflow training → Model training: passes train data
src/pipeline/training_pipeline.py - Kubeflow training → Model evaluation: passes test and model
src/pipeline/training_pipeline.py - Kubeflow training → Model promotion: passes evaluation
src/pipeline/training_pipeline.py - Data ingestion → Data validation: provides metadata
src/pipeline/training_pipeline.py - Data ingestion → Data cleaning: provides raw data
src/pipeline/training_pipeline.py - Data cleaning → Feature transformation: provides cleaned data
src/pipeline/training_pipeline.py - Feature transformation → Model training: provides train split
src/pipeline/training_pipeline.py - Feature transformation → Model evaluation: provides test split
src/pipeline/training_pipeline.py - Model training → Model evaluation: provides model
src/pipeline/training_pipeline.py - Model evaluation → Model promotion: provides acceptance
src/pipeline/training_pipeline.py - Data ingestion → Mongo data access: reads collection
src/components/data_ingestion.py - Mongo data access → MongoDB connection: uses connection
src/data_access/data.py - MongoDB connection → MongoDB: queries
- Data ingestion → Object storage access: uploads dataset
src/components/data_ingestion.py - Feature transformation → Object storage access: reads and writes
src/components/data_transformation.py - Model training → Object storage access: reads and writes
src/components/model_trainer.py - Model evaluation → Object storage access: reads model data
src/components/model_evaluation.py - Model promotion → Object storage access: promotes artifact
src/components/model_pusher.py - Object storage access → MinIO / S3: accesses objects
- Data ingestion → Stage configuration: uses settings
src/components/data_ingestion.py - Feature transformation → Stage configuration: uses settings
src/components/data_transformation.py - Model training → Stage configuration: uses settings
src/components/model_trainer.py - Model promotion → Stage configuration: uses settings
src/components/model_pusher.py - Data ingestion → Shared utilities: hashes data
src/components/data_ingestion.py - Feature transformation → MLflow tracking: logs experiment
src/components/data_transformation.py - Model training → MLflow tracking: logs model
src/components/model_trainer.py - Model promotion → Inference transformer: updates serving artifact
README.md - Inference transformer → KServe predictor: sends predictions
README.md - Inference transformer → MinIO / S3: loads config and logs
README.md - KServe predictor → Prometheus and Grafana: exposes metrics
README.md - Inference transformer → Drift detection: logs payloads
README.md - Drift detection → MinIO / S3: reads artifacts and logs
README.md - Drift detection → Evidently: measures drift
README.md - Drift detection → Kubeflow training: triggers retraining
README.md