Component View (C4 — Level 3)¶
This view focuses on internal components and contracts between them. Implementation details live in the Data/ML/Serving sections.
flowchart TB
subgraph Pipelines[Offline Pipelines]
S1[Source Extraction]
S2[Preprocessing]
S3[Feature Engineering]
S4[Train + Validate]
S5[Evaluate + Report]
S6[Register Model]
end
subgraph Contracts[Contracts]
DC[Data Contract - GE Suites]
MC[Model Contract - Signature + Schema]
AC[API Contract - OpenAPI/Pydantic Schemas]
end
subgraph Runtime[Online Runtime]
FE[Online Feature Assembly]
INF[Inference]
MON[Telemetry + Monitoring]
end
S1 --> S2 --> S3 --> S4 --> S5 --> S6
DC -.gates.-> S2
DC -.gates.-> S3
MC -.enforced.-> S6
AC -.enforced.-> INF
S6 --> INF
FE --> INF
INF --> MON
Key contracts¶
- Data Contract: schema and data quality checks (Great Expectations)
- Model Contract: input schema + output schema + MLflow signature
- API Contract: request/response schemas + versioning strategy
Train/Serve parity strategy¶
The system aims to ensure that:
- offline feature logic matches online inference logic,
- model artifacts and preprocessing steps are packaged together,
- API always loads a versioned model by
model_urirather than local files.