# balwa/eta-mlops architecture

> Architecture diagram of the GitHub repository balwa/eta-mlops, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/balwa/eta-mlops
- Repository: https://github.com/balwa/eta-mlops

## Overview

This is an MLOps teaching repository built around a food-delivery ETA service. Its principal workflow generates seeded order data, derives trustworthy delivery-time labels, builds restaurant features and trains a model; the running service combines a request with its cached feature store to return an ETA. The graph also shows the optional UI, store-corruption exercise and experiment tracking. README documents additional course topics, but their broader integrations are not represented as runtime components where the supplied tree or excerpts do not establish their wiring.

Main entry points: [`eta/service.py`](https://github.com/balwa/eta-mlops/blob/main/eta/service.py) (ETA API), [`eta/ui.py`](https://github.com/balwa/eta-mlops/blob/main/eta/ui.py) (Browser UI), [`eta/generate.py`](https://github.com/balwa/eta-mlops/blob/main/eta/generate.py) (Order generator), [`eta/label.py`](https://github.com/balwa/eta-mlops/blob/main/eta/label.py) (Label and split)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_generator["Order generator<br/>[generate.py]"]
  node_raworders["Raw orders"]
  node_labeler["Label and split<br/>[label.py]"]
  node_labelled["Labelled orders"]
  node_featurejob["Feature-store job<br/>[feature_job.py]"]
end

subgraph group_serving["ETA serving"]
  node_featurestore[("Feature store")]
  node_model["ETA model"]
  node_api["ETA API<br/>[service.py]"]
  node_prediction["ETA response"]
  node_ui["Browser UI<br/>[ui.py]"]
end

subgraph group_learning["Course experiments"]
  node_trainer["Model training<br/>[train.py]"]
  node_tracking["Run tracking<br/>[track.py]"]
  node_losslab["Loss sweep<br/>[loss_sweep.py]"]
  node_imbalancelab["Imbalance study<br/>[imbalance.py]"]
end

subgraph group_ops["Operations"]
  node_corrupt["Store corruption<br/>[corrupt.py]"]
end

node_student(("Student / caller"))

node_student -->|"runs"| node_generator
node_generator -->|"writes"| node_raworders
node_raworders -->|"reads"| node_labeler
node_labeler -->|"writes"| node_labelled
node_labelled -->|"trains from"| node_trainer
node_trainer -->|"writes"| node_model
node_student -->|"runs"| node_featurejob
node_featurejob -->|"refreshes"| node_featurestore
node_student -->|"requests prediction"| node_api
node_model -->|"loads"| node_api
node_featurestore -->|"loads and looks up"| node_api
node_api -->|"returns"| node_prediction
node_student -->|"uses"| node_ui
node_ui -->|"calls predict"| node_api
node_ui -->|"reads store info"| node_api
node_student -->|"runs"| node_corrupt
node_corrupt -->|"edits or rebuilds"| node_featurestore
node_student -->|"runs experiment"| node_tracking
node_labelled -->|"reads split data"| node_tracking
node_student -->|"runs experiment"| node_losslab
node_labelled -->|"reads split data"| node_losslab
node_student -->|"runs experiment"| node_imbalancelab
node_labelled -->|"reads split data"| node_imbalancelab

click node_generator "https://github.com/balwa/eta-mlops/blob/main/eta/generate.py"
click node_labeler "https://github.com/balwa/eta-mlops/blob/main/eta/label.py"
click node_featurejob "https://github.com/balwa/eta-mlops/blob/main/eta/feature_job.py"
click node_trainer "https://github.com/balwa/eta-mlops/blob/main/eta/train.py"
click node_api "https://github.com/balwa/eta-mlops/blob/main/eta/service.py"
click node_ui "https://github.com/balwa/eta-mlops/blob/main/eta/ui.py"
click node_corrupt "https://github.com/balwa/eta-mlops/blob/main/eta/corrupt.py"
click node_tracking "https://github.com/balwa/eta-mlops/blob/main/track.py"
click node_losslab "https://github.com/balwa/eta-mlops/blob/main/loss_sweep.py"
click node_imbalancelab "https://github.com/balwa/eta-mlops/blob/main/imbalance.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_generator,node_raworders,node_labeler,node_labelled,node_featurejob toneBlue
class node_featurestore,node_model,node_api,node_prediction,node_ui toneAmber
class node_trainer,node_tracking,node_losslab,node_imbalancelab toneMint
class node_corrupt toneRose
class node_student toneIndigo
```

## Components

### Data preparation

- [Order generator](https://github.com/balwa/eta-mlops/blob/main/eta/generate.py): `eta/generate.py`
- **Raw orders**
- [Label and split](https://github.com/balwa/eta-mlops/blob/main/eta/label.py): `eta/label.py`
- **Labelled orders**
- [Feature-store job](https://github.com/balwa/eta-mlops/blob/main/eta/feature_job.py): `eta/feature_job.py`

### ETA serving

- **Feature store**
- **ETA model**
- [ETA API](https://github.com/balwa/eta-mlops/blob/main/eta/service.py): `eta/service.py`
- **ETA response**
- [Browser UI](https://github.com/balwa/eta-mlops/blob/main/eta/ui.py): `eta/ui.py`

### Course experiments

- [Model training](https://github.com/balwa/eta-mlops/blob/main/eta/train.py): `eta/train.py`
- [Run tracking](https://github.com/balwa/eta-mlops/blob/main/track.py): `track.py`
- [Loss sweep](https://github.com/balwa/eta-mlops/blob/main/loss_sweep.py): `loss_sweep.py`
- [Imbalance study](https://github.com/balwa/eta-mlops/blob/main/imbalance.py): `imbalance.py`

### Operations

- [Store corruption](https://github.com/balwa/eta-mlops/blob/main/eta/corrupt.py): `eta/corrupt.py`

### Other components

- **Student / caller**

## Connections

- Student / caller → Order generator: runs
- Order generator → Raw orders: writes
- Raw orders → Label and split: reads
- Label and split → Labelled orders: writes
- Labelled orders → Model training: trains from
- Model training → ETA model: writes
- Student / caller → Feature-store job: runs
- Feature-store job → Feature store: refreshes
- Student / caller → ETA API: requests prediction
- ETA model → ETA API: loads
- Feature store → ETA API: loads and looks up
- ETA API → ETA response: returns
- Student / caller → Browser UI: uses
- Browser UI → ETA API: calls predict
- Browser UI → ETA API: reads store info
- Student / caller → Store corruption: runs
- Store corruption → Feature store: edits or rebuilds
- Student / caller → Run tracking: runs experiment
- Labelled orders → Run tracking: reads split data
- Student / caller → Loss sweep: runs experiment
- Labelled orders → Loss sweep: reads split data
- Student / caller → Imbalance study: runs experiment
- Labelled orders → Imbalance study: reads split data
