# opelliusai/radio-mlops architecture

> Architecture diagram of the GitHub repository opelliusai/radio-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/opelliusai/radio-mlops
- Repository: https://github.com/opelliusai/radio-mlops

## Overview

RADIO-MLOps is a chest-radiograph diagnosis and model-lifecycle application. Users submit images for predictions, review their analyses, and contribute corrected labels; administrators manage datasets and models and inspect performance and drift. The documented data lifecycle brings Kaggle and production data into reference datasets for training, while MLflow tracks and serves model versions. Airflow schedules health checks, deployment, and drift jobs; Prometheus and Grafana support service monitoring. The graph follows documented capabilities and sampled call paths; unsampled API and monitoring implementations are represented only at their documented boundaries.

Main entry points: [`src/scripts`](https://github.com/opelliusai/radio-mlops/tree/main/src/scripts) (Monitoring jobs), [`src/utils/utils_streamlit.py`](https://github.com/opelliusai/radio-mlops/blob/main/src/utils/utils_streamlit.py) (UI API client), [`src/api/admin_api.py`](https://github.com/opelliusai/radio-mlops/blob/main/src/api/admin_api.py) (Admin API), [`src/mlflow/model_tracking.py`](https://github.com/opelliusai/radio-mlops/blob/main/src/mlflow/model_tracking.py) (Model tracking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_streamlit["Streamlit app<br/>[Accueil.py]"]
  node_pages["Workflow pages"]
  node_streamutil["UI API client<br/>[utils_streamlit.py]"]
end

subgraph group_api["APIs"]
  node_userapi["User API<br/>[user_api.py]"]
  node_adminapi["Admin API<br/>[admin_api.py]"]
  node_monitorapi["Monitoring API<br/>[monitoring_api.py]"]
end

subgraph group_ml["Data and models"]
  node_prediction["Image prediction<br/>[predict_model.py]"]
  node_preprocess["Image preprocessing"]
  node_datasetdownload["Kaggle ingestion"]
  node_datasetupdate["Dataset update<br/>[update_dataset.py]"]
  node_datasetclean["Dataset cleaning<br/>[clean_dataset.py]"]
  node_train["Model training<br/>[train_model.py]"]
  node_modelbuild["Model building<br/>[build_model.py]"]
  node_tracking["Model tracking<br/>[model_tracking.py]"]
  node_serving["Model serving<br/>[model_serving.py]"]
  node_drift["Drift detection"]
  node_modeldrift["Model drift"]
  node_datastore[("Versioned datasets<br/>[utils_data.py]")]
  node_registry[("MLflow registry")]
end

subgraph group_ops["Operations"]
  node_airflow["Airflow schedules"]
  node_monitorjobs["Monitoring jobs"]
  node_prometheus[("Prometheus")]
  node_grafana["Grafana"]
end

node_user(("User"))
node_admin(("Administrator"))
node_kaggle(("Kaggle"))
node_email(("Email alerts"))

node_user -->|"uses"| node_streamlit
node_admin -->|"uses"| node_streamlit
node_streamlit -->|"dispatches"| node_pages
node_pages -->|"requests"| node_streamutil
node_streamutil -->|"calls"| node_userapi
node_streamutil -->|"calls"| node_adminapi
node_streamutil -->|"calls"| node_monitorapi
node_userapi -->|"runs prediction"| node_prediction
node_prediction -->|"preprocesses image"| node_preprocess
node_prediction -->|"loads production model"| node_serving
node_userapi -->|"records contribution"| node_datasetupdate
node_datasetupdate -->|"updates versions"| node_datastore
node_adminapi -->|"starts download"| node_datasetdownload
node_datasetdownload -->|"downloads data"| node_kaggle
node_adminapi -->|"updates reference data"| node_datasetupdate
node_adminapi -->|"starts training"| node_train
node_train -->|"prepares data"| node_datasetclean
node_train -->|"trains and logs"| node_tracking
node_tracking -->|"builds model"| node_modelbuild
node_tracking -->|"registers version"| node_registry
node_serving -->|"loads production model"| node_registry
node_adminapi -->|"manages deployment"| node_tracking
node_monitorapi -->|"calculates data drift"| node_drift
node_monitorapi -->|"calculates model drift"| node_modeldrift
node_airflow -->|"runs scheduled jobs"| node_monitorjobs
node_airflow -.->|"triggers monitoring"| node_monitorapi
node_monitorjobs -->|"checks data drift"| node_drift
node_monitorjobs -->|"checks model drift"| node_modeldrift
node_monitorjobs -.->|"may retrain"| node_tracking
node_monitorjobs -.->|"deploys candidate"| node_registry
node_monitorjobs -.->|"sends alerts"| node_email
node_userapi -->|"exposes metrics"| node_prometheus
node_prometheus -->|"provides metrics"| node_grafana
node_streamutil -->|"checks service status"| node_prometheus

click node_streamlit "https://github.com/opelliusai/radio-mlops/blob/main/src/streamlit/Accueil.py"
click node_pages "https://github.com/opelliusai/radio-mlops/tree/main/src/streamlit/st_pages"
click node_streamutil "https://github.com/opelliusai/radio-mlops/blob/main/src/utils/utils_streamlit.py"
click node_userapi "https://github.com/opelliusai/radio-mlops/blob/main/src/api/user_api.py"
click node_adminapi "https://github.com/opelliusai/radio-mlops/blob/main/src/api/admin_api.py"
click node_monitorapi "https://github.com/opelliusai/radio-mlops/blob/main/src/api/monitoring_api.py"
click node_prediction "https://github.com/opelliusai/radio-mlops/blob/main/src/models/predict_model.py"
click node_preprocess "https://github.com/opelliusai/radio-mlops/blob/main/src/datasets/image_preprocessing.py"
click node_datasetdownload "https://github.com/opelliusai/radio-mlops/blob/main/src/datasets/download_dataset.py"
click node_datasetupdate "https://github.com/opelliusai/radio-mlops/blob/main/src/datasets/update_dataset.py"
click node_datasetclean "https://github.com/opelliusai/radio-mlops/blob/main/src/datasets/clean_dataset.py"
click node_train "https://github.com/opelliusai/radio-mlops/blob/main/src/models/train_model.py"
click node_modelbuild "https://github.com/opelliusai/radio-mlops/blob/main/src/models/build_model.py"
click node_tracking "https://github.com/opelliusai/radio-mlops/blob/main/src/mlflow/model_tracking.py"
click node_serving "https://github.com/opelliusai/radio-mlops/blob/main/src/mlflow/model_serving.py"
click node_drift "https://github.com/opelliusai/radio-mlops/blob/main/src/models/data_drift_detection.py"
click node_modeldrift "https://github.com/opelliusai/radio-mlops/blob/main/src/models/model_drift_detection.py"
click node_datastore "https://github.com/opelliusai/radio-mlops/blob/main/src/utils/utils_data.py"
click node_airflow "https://github.com/opelliusai/radio-mlops/tree/main/airflow/dags"
click node_monitorjobs "https://github.com/opelliusai/radio-mlops/tree/main/src/scripts"

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_streamlit,node_pages,node_streamutil,node_user toneBlue
class node_userapi,node_adminapi,node_monitorapi toneAmber
class node_prediction,node_preprocess,node_datasetdownload,node_datasetupdate,node_datasetclean,node_train,node_modelbuild,node_tracking,node_serving,node_drift,node_modeldrift,node_datastore,node_registry toneMint
class node_airflow,node_monitorjobs,node_prometheus,node_grafana toneRose
class node_admin,node_kaggle,node_email toneIndigo
```

## Components

### User interface

- [Streamlit app](https://github.com/opelliusai/radio-mlops/blob/main/src/streamlit/Accueil.py): `src/streamlit/Accueil.py`
- [Workflow pages](https://github.com/opelliusai/radio-mlops/tree/main/src/streamlit/st_pages): `src/streamlit/st_pages`
- [UI API client](https://github.com/opelliusai/radio-mlops/blob/main/src/utils/utils_streamlit.py): `src/utils/utils_streamlit.py`

### APIs

- [User API](https://github.com/opelliusai/radio-mlops/blob/main/src/api/user_api.py): `src/api/user_api.py`
- [Admin API](https://github.com/opelliusai/radio-mlops/blob/main/src/api/admin_api.py): `src/api/admin_api.py`
- [Monitoring API](https://github.com/opelliusai/radio-mlops/blob/main/src/api/monitoring_api.py): `src/api/monitoring_api.py`

### Data and models

- [Image prediction](https://github.com/opelliusai/radio-mlops/blob/main/src/models/predict_model.py): `src/models/predict_model.py`
- [Image preprocessing](https://github.com/opelliusai/radio-mlops/blob/main/src/datasets/image_preprocessing.py): `src/datasets/image_preprocessing.py`
- [Kaggle ingestion](https://github.com/opelliusai/radio-mlops/blob/main/src/datasets/download_dataset.py): `src/datasets/download_dataset.py`
- [Dataset update](https://github.com/opelliusai/radio-mlops/blob/main/src/datasets/update_dataset.py): `src/datasets/update_dataset.py`
- [Dataset cleaning](https://github.com/opelliusai/radio-mlops/blob/main/src/datasets/clean_dataset.py): `src/datasets/clean_dataset.py`
- [Model training](https://github.com/opelliusai/radio-mlops/blob/main/src/models/train_model.py): `src/models/train_model.py`
- [Model building](https://github.com/opelliusai/radio-mlops/blob/main/src/models/build_model.py): `src/models/build_model.py`
- [Model tracking](https://github.com/opelliusai/radio-mlops/blob/main/src/mlflow/model_tracking.py): `src/mlflow/model_tracking.py`
- [Model serving](https://github.com/opelliusai/radio-mlops/blob/main/src/mlflow/model_serving.py): `src/mlflow/model_serving.py`
- [Drift detection](https://github.com/opelliusai/radio-mlops/blob/main/src/models/data_drift_detection.py): `src/models/data_drift_detection.py`
- [Model drift](https://github.com/opelliusai/radio-mlops/blob/main/src/models/model_drift_detection.py): `src/models/model_drift_detection.py`
- [Versioned datasets](https://github.com/opelliusai/radio-mlops/blob/main/src/utils/utils_data.py): `src/utils/utils_data.py`
- **MLflow registry**

### Operations

- [Airflow schedules](https://github.com/opelliusai/radio-mlops/tree/main/airflow/dags): `airflow/dags`
- [Monitoring jobs](https://github.com/opelliusai/radio-mlops/tree/main/src/scripts): `src/scripts`
- **Prometheus**
- **Grafana**

### Other components

- **User**
- **Administrator**
- **Kaggle**
- **Email alerts**

## Connections

- User → Streamlit app: uses
- Administrator → Streamlit app: uses
- Streamlit app → Workflow pages: dispatches
- Workflow pages → UI API client: requests
- UI API client → User API: calls
- UI API client → Admin API: calls
- UI API client → Monitoring API: calls
- User API → Image prediction: runs prediction
- Image prediction → Image preprocessing: preprocesses image
- Image prediction → Model serving: loads production model
- User API → Dataset update: records contribution
- Dataset update → Versioned datasets: updates versions
- Admin API → Kaggle ingestion: starts download
- Kaggle ingestion → Kaggle: downloads data
- Admin API → Dataset update: updates reference data
- Admin API → Model training: starts training
- Model training → Dataset cleaning: prepares data
- Model training → Model tracking: trains and logs
- Model tracking → Model building: builds model
- Model tracking → MLflow registry: registers version
- Model serving → MLflow registry: loads production model
- Admin API → Model tracking: manages deployment
- Monitoring API → Drift detection: calculates data drift
- Monitoring API → Model drift: calculates model drift
- Airflow schedules → Monitoring jobs: runs scheduled jobs
- Airflow schedules → Monitoring API: triggers monitoring
- Monitoring jobs → Drift detection: checks data drift
- Monitoring jobs → Model drift: checks model drift
- Monitoring jobs → Model tracking: may retrain
- Monitoring jobs → MLflow registry: deploys candidate
- Monitoring jobs → Email alerts: sends alerts
- User API → Prometheus: exposes metrics
- Prometheus → Grafana: provides metrics
- UI API client → Prometheus: checks service status
