Skip to content

Commit 64bc230

Browse files
committed
docs: establish project roadmap, and add DEVLOG
- Add technical roadmap with 4-phase progression for 2026 standards - Initialize DEVLOG.md for tracking engineering decisions and learning. - Update .gitignore to handle documentation artifacts.
1 parent e679fbb commit 64bc230

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ models/
2020

2121
# Environment variables
2222
.env
23+
24+
# Project files
25+
github_projects.md

doc/DEVLOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Developer Log: `Production-Ready MLOps Workflow`
2+
3+
This log documents my experiences, challenges, lessons learned, and solutions found during the development of this project.
4+
5+
---
6+
7+
[2026-02-08]
8+
9+
### Project Planning & Strategic Roadmap
10+
Today I established the strategic foundation to transform the project from a basic prototype into an industrial-grade **ML Engineering** system for 2026.
11+
12+
#### Achievements
13+
- **Technical Roadmap Design:** Created a 4-phase plan addressing API modernization, lifecycle management (MLOps), observability/explainability (XAI), and Generative AI integration.
14+
- **Infrastructure Strategy:** Defined a "Cloud-Native" approach using containers, automated CI/CD, and deployment options on AWS (App Runner/ECS) or modern PaaS.
15+
- **GitHub Projects Setup:** Broke down the roadmap into a `github_projects.md` file with detailed issues, ready to be converted into Kanban board cards.
16+
- **Overfitting Mitigation Plan:** Identified that the current model's overfitting is not a bug, but an opportunity to implement data "Guardrails" with Pydantic and drift monitoring with Evidently AI.
17+
18+
#### Challenges & Solutions
19+
- **Challenge:** The Breast Cancer dataset is generic and the model overfits.
20+
- **Solution:** Shifted the focus towards a "controlled simulation environment". Range validation and robustness tests will protect the model, demonstrating strong ML Engineering skills.
21+
22+
#### Next Steps
23+
- Begin **Phase 1: API Modernization**.
24+
- The first issue will be `phase1-01: migrate flask api to fastapi` to gain asynchrony and native validation.
25+
- Configure the development environment with `uv` to ensure maximum speed in the feedback cycle.

doc/ROADMAP.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Technical Roadmap: `Production-Ready MLOps Workflow`
2+
3+
This document outlines the strategic technical progression from a basic ML pipeline to a comprehensive **Machine Learning Engineering** system, focusing on robustness, observability, and 2026 AI trends.
4+
5+
## Tech Stack 2026
6+
7+
| Category | Tool / Technology | Purpose | Implementation |
8+
| --- | --- | --- | --- |
9+
| **Backend API** | **FastAPI** | High-performance asynchronous inference and OpenAPI docs. | Phase 1 |
10+
| **Frontend UI** | **Streamlit** | Interactive dashboard for prediction visualization. | Phase 1 |
11+
| **ML Lifecycle** | **MLflow** | Experiment tracking, model registry, and lineage. | Phase 2 |
12+
| **Validation** | **Pydantic v2** | Strict type validation and statistical range checks. | Phase 1 - 2 |
13+
| **Observability** | **Evidently AI** | Data Drift monitoring and production model quality. | Phase 3 |
14+
| **Trustworthy AI** | **SHAP / LIME** | Model Explainability (XAI) to mitigate overfitting. | Phase 3 |
15+
| **Agentic AI** | **PydanticAI / LangChain** | AI Agent to interpret simulated medical results. | Phase 4 |
16+
| **Tooling (DX)** | **uv / Ruff / MyPy** | Ultra-fast Rust-based dev stack and strict typing. | **All Phases** |
17+
| **DevOps** | **Docker / GH Actions** | Containerization and CI/CD pipelines with Quality Gates. | **All Phases** |
18+
19+
---
20+
21+
## 🟢 Phase 1: API Modernization & Robustness
22+
23+
**Goal:** Replace the technical foundation with 2026 modern standards and ensure the model does not process invalid data.
24+
25+
### Backend & API
26+
* **FastAPI Migration:** Replace Flask to gain automatic validation, asynchronous support, and interactive documentation (/docs).
27+
* **Data Guardrails:** Implement `Pydantic` validators to verify that inputs fall within the statistical ranges of the original dataset (active overfitting mitigation).
28+
29+
### Tooling & Quality
30+
* **Strict Typing:** Configure `MyPy` to ensure the data flow between preprocessing and inference is 100% type-safe.
31+
* **Fast Linting:** Maintain `Ruff` usage to ensure PEP 8 code standards and software quality.
32+
33+
---
34+
35+
## 🟡 Phase 2: Lifecycle Management (MLOps Core)
36+
37+
**Goal:** Transition from "training scripts" to professional "experiment management."
38+
39+
### ML Lifecycle
40+
* **Experiment Tracking (MLflow):** Record every model run, comparing training vs. validation metrics to visually identify overfitting.
41+
* **Model Registry:** Implement a workflow where only models passing robustness tests are promoted to the API.
42+
43+
### Data Engineering
44+
* **DVC (Data Version Control):** Version the `data.csv` dataset to ensure every prediction can be traced back to the exact data used for training.
45+
46+
---
47+
48+
## 🟠 Phase 3: Observability & Explainability (XAI)
49+
50+
**Goal:** Demonstrate that the system can detect failures and explain its decisions.
51+
52+
### Monitoring
53+
* **Drift Detection (Evidently AI):** Create a pipeline to compare real-time input data with training data. If the "patient" differs significantly from known data, the system generates a "Low Confidence" alert.
54+
* **Structured Logging:** Implement JSON-format logs for compatibility with modern observability stacks.
55+
56+
### Trustworthy AI
57+
* **Interpretability (SHAP):** Add a layer that returns *why* "Malignant" was predicted (e.g., "Mean Radius > 15.2"). This turns an overfitted model into an auditable tool.
58+
* **Robustness Tests:** A `Pytest` suite that injects random noise into data to verify model consistency.
59+
60+
---
61+
62+
## 🔵 Phase 4: Connected Intelligence (2026 Trend)
63+
64+
**Goal:** Integrate the predictive model into a Generative AI and full automation workflow.
65+
66+
### Agentic Workflows
67+
* **AI-Agent Reporting:** Implement an agent (LLM) that takes technical output (prediction + SHAP) and generates a narrative summary for the user in Streamlit.
68+
* **Automated Retraining Loop:** Simulate a workflow where, upon detecting severe drift, the system automatically triggers a GitHub Actions job to retrain the model.
69+
70+
### Infrastructure & Deployment
71+
* **Cloud-Native Deployment:** Final deployment on scalable infrastructure (Kubernetes or Serverless Containers) with integrated health monitoring.
72+
* **Container Orchestration:** Use `Docker Compose` for local multi-service orchestration (API + UI) and prepare for production-grade scaling.
73+
* **AWS Ecosystem (Optional):** Leverage **AWS App Runner** or **ECS (Elastic Container Service)** for managed container execution, ensuring high availability and auto-scaling without manual server management.
74+
* **Infrastructure as Code (IaC):** Define environment configurations through code (e.g., `render.yaml` or Docker specifications) to ensure environment parity between development and production.
75+
* **Automated CI/CD:** Establish a "Quality Gate" pipeline where code is only deployed if all tests (Pytest), linting (Ruff), and type checks (MyPy) pass, ensuring a zero-downtime, reliable deployment flow.

0 commit comments

Comments
 (0)