# praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery architecture

> Architecture diagram of the GitHub repository praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery
- Repository: https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery

## Overview

1. This repository is a small distributed Python platform split into two deployable services: a FastAPI API in `api/` and a Celery worker in `worker/`. The top-level `docker-compose.yml` ties them together with Redis and MLflow, so the architecture is service-oriented rather than a single monolith.

2. The `api/` service is the synchronous request layer. Its app lives under `api/app/` with clear FastAPI-style boundaries: `routes/` for HTTP endpoints, `schemas/` for request/response models, `services/` for business logic, and `core/` for configuration and logging. In the current tree, the only explicit endpoint is `GET /health`, so the API is scaffolded for expansion but already production-shaped.

3. The `worker/` service is the asynchronous execution layer. It uses Celery (`worker/app/celery_app.py`) and defines background jobs in `worker/app/tasks/jobs.py`. This is the boundary where longer-running AutoML work should live, separate from HTTP request handling.

4. The worker’s internal service split suggests two main responsibilities: `automl_service.py` for model training/selection workflows and `artifact_service.py` for persisting or organizing outputs. That means the worker is not just a generic queue consumer; it is the compute-and-artifact subsystem for the platform.

5. MLflow is an external system in the architecture and is central to experiment tracking / model artifact management. The presence of MLflow in the compose stack strongly implies the worker logs runs, parameters, metrics, and artifacts there rather than keeping them inside the API process.

6. Redis is the queue backbone. In this setup it is the Celery broker and likely the result backend, forming the handoff point between the API and worker. The main data flow is: a client calls the API, the API submits a background job, Redis carries the task, and the worker executes it.

7. Both services have their own `core/config.py` and `core/logging.py`, which means configuration and logging are intentionally isolated per runtime. Environment variables drive behavior in each container, and the `.env.example` files indicate the deployment model is config-heavy but code-light.

8. The `schemas/` packages in both services define the contract boundary. In the API, schemas model HTTP payloads; in the worker, `schemas/job.py` likely describes task/job state or job metadata. This keeps transport concerns separate from service logic.

9. `worker/app/utils/path_utils.py` suggests filesystem path handling for local artifacts, temporary files, or ML outputs. That is a clue that the worker may manage intermediate model files before pushing final artifacts to MLflow or another storage target.

10. Docker is the deployment boundary for both services. Each service has its own `Dockerfile`, and the compose file provides local orchestration across API, worker, Redis, and MLflow. There is no separate database service visible in the tree, which is an important architectural signal.

11. The repository currently looks like a starter scaffold for an AutoML platform rather than a completed product. The structure already separates API, async execution, observability/artifact tracking, and shared infrastructure, so an architecture diagram should emphasize those boundaries even though only the health endpoint is implemented in the snapshot.

Main entry points: [`api/app/main.py`](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/api/app/main.py) (API app), [`docker-compose.yml`](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/docker-compose.yml) (Compose stack), [`worker/app/main.py`](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/main.py) (Worker app), [`worker/app/tasks/jobs.py`](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/tasks/jobs.py) (Job tasks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API Service"]
  node_api_main["API app<br/>fastapi entrypoint<br/>[main.py]"]
  node_api_routes["Health route<br/>http route<br/>[health.py]"]
  node_api_schemas["API schemas<br/>payload models<br/>[health.py]"]
  node_api_service["Health logic<br/>service logic<br/>[health_service.py]"]
  node_api_config["API config<br/>runtime config<br/>[config.py]"]
  node_api_logging["API logging<br/>observability<br/>[logging.py]"]
end

subgraph group_worker["Worker Service"]
  node_worker_main["Worker app<br/>worker entrypoint<br/>[main.py]"]
  node_celery_app["Celery app<br/>celery runtime<br/>[celery_app.py]"]
  node_jobs["Job tasks<br/>async jobs<br/>[jobs.py]"]
  node_automl["AutoML service<br/>training workflow<br/>[automl_service.py]"]
  node_artifact["Artifact service<br/>artifact mgmt"]
  node_job_schema["Job schema<br/>task contract<br/>[job.py]"]
  node_worker_config["Worker config<br/>runtime config<br/>[config.py]"]
  node_worker_logging["Worker logging<br/>observability<br/>[logging.py]"]
  node_path_utils["Path utils<br/>filesystem helper<br/>[path_utils.py]"]
end

subgraph group_infra["Infrastructure"]
  node_compose["Compose stack<br/>orchestrator<br/>[docker-compose.yml]"]
  node_client(("Client<br/>caller"))
  node_redis[("Redis<br/>queue broker")]
  node_mlflow[("MLflow<br/>tracking store")]
end

node_client -->|"HTTP request"| node_api_main
node_compose -->|"runs"| node_api_main
node_compose -->|"runs"| node_worker_main
node_compose -->|"provides"| node_redis
node_compose -->|"provides"| node_mlflow
node_api_main -->|"mounts"| node_api_routes
node_api_routes -->|"validates"| node_api_schemas
node_api_routes -->|"delegates"| node_api_service
node_api_main -->|"loads"| node_api_config
node_api_main -->|"uses"| node_api_logging
node_api_service -->|"queues task"| node_redis
node_worker_main -->|"boots"| node_celery_app
node_celery_app -->|"brokers"| node_redis
node_celery_app -->|"registers"| node_jobs
node_jobs -->|"uses"| node_job_schema
node_jobs -->|"executes"| node_automl
node_jobs -->|"persists"| node_artifact
node_automl -->|"logs runs"| node_mlflow
node_artifact -->|"manages paths"| node_path_utils
node_worker_main -->|"loads"| node_worker_config
node_worker_main -->|"uses"| node_worker_logging

click node_compose "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/docker-compose.yml"
click node_api_main "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/api/app/main.py"
click node_api_routes "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/api/app/routes/health.py"
click node_api_schemas "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/api/app/schemas/health.py"
click node_api_service "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/api/app/services/health_service.py"
click node_api_config "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/api/app/core/config.py"
click node_api_logging "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/api/app/core/logging.py"
click node_worker_main "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/main.py"
click node_celery_app "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/celery_app.py"
click node_jobs "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/tasks/jobs.py"
click node_automl "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/services/automl_service.py"
click node_artifact "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/services/artifact_service.py"
click node_job_schema "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/schemas/job.py"
click node_worker_config "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/core/config.py"
click node_worker_logging "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/core/logging.py"
click node_path_utils "https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/utils/path_utils.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_api_main,node_api_routes,node_api_schemas,node_api_service,node_api_config,node_api_logging toneBlue
class node_worker_main,node_celery_app,node_jobs,node_automl,node_artifact,node_job_schema,node_worker_config,node_worker_logging,node_path_utils toneAmber
class node_compose,node_client,node_redis,node_mlflow toneMint
```

## Components

### API Service

Synchronous FastAPI request layer and HTTP contract.

- [API app](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/api/app/main.py): fastapi entrypoint · FastAPI application wiring and startup for the request service. · `api/app/main.py`
- [Health route](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/api/app/routes/health.py): http route · Explicit HTTP endpoint surface currently centered on health checks. · `api/app/routes/health.py`
- [API schemas](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/api/app/schemas/health.py): payload models · Request and response contracts for the API service. · `api/app/schemas/health.py`
- [Health logic](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/api/app/services/health_service.py): service logic · Business logic behind the health endpoint. · `api/app/services/health_service.py`
- [API config](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/api/app/core/config.py): runtime config · Environment-driven API settings. · `api/app/core/config.py`
- [API logging](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/api/app/core/logging.py): observability · Logging setup isolated to the API runtime. · `api/app/core/logging.py`

### Worker Service

Asynchronous Celery execution layer for AutoML jobs.

- [Worker app](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/main.py): worker entrypoint · Worker process bootstrap and runtime wiring. · `worker/app/main.py`
- [Celery app](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/celery_app.py): celery runtime · Celery configuration and broker/result integration. · `worker/app/celery_app.py`
- [Job tasks](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/tasks/jobs.py): async jobs · Background task definitions executed by Celery. · `worker/app/tasks/jobs.py`
- [AutoML service](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/services/automl_service.py): training workflow · Model training and selection workflows. · `worker/app/services/automl_service.py`
- [Artifact service](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/services/artifact_service.py): artifact mgmt · Persistence and organization of outputs and artifacts. · `worker/app/services/artifact_service.py`
- [Job schema](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/schemas/job.py): task contract · Job metadata and state contract used by the worker. · `worker/app/schemas/job.py`
- [Worker config](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/core/config.py): runtime config · Environment-driven worker settings. · `worker/app/core/config.py`
- [Worker logging](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/core/logging.py): observability · Logging setup isolated to the worker runtime. · `worker/app/core/logging.py`
- [Path utils](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/worker/app/utils/path_utils.py): filesystem helper · Filesystem path handling for local intermediate files. · `worker/app/utils/path_utils.py`

### Infrastructure

Compose-managed runtime and external backing services.

- [Compose stack](https://github.com/praveenadapa425/automated-machine-learning-automl-platform-with-mlflow-and-celery/blob/main/docker-compose.yml): orchestrator · Local multi-service deployment for API, worker, Redis, and MLflow. · `docker-compose.yml`
- **Client**: caller · External caller that reaches the API.
- **Redis**: queue broker · Task queue backbone between API and worker.
- **MLflow**: tracking store · Experiment tracking and artifact registry.

## Connections

- Client → API app: HTTP request · External callers hit the FastAPI service.
- Compose stack → API app: runs · Compose starts the API container.
- Compose stack → Worker app: runs · Compose starts the worker container.
- Compose stack → Redis: provides · Compose provisions the queue broker.
- Compose stack → MLflow: provides · Compose provisions the tracking service.
- API app → Health route: mounts · The app exposes HTTP routes.
- Health route → API schemas: validates · Route handlers use request and response models.
- Health route → Health logic: delegates · Endpoint handlers defer logic to services.
- API app → API config: loads · API startup reads runtime settings.
- API app → API logging: uses · API startup configures logging.
- Health logic → Redis: queues task · The API submits background work to the broker.
- Worker app → Celery app: boots · Worker runtime initializes Celery.
- Celery app → Redis: brokers · Celery consumes tasks through Redis.
- Celery app → Job tasks: registers · Celery discovers executable jobs.
- Job tasks → Job schema: uses · Task execution is shaped by job metadata contracts.
- Job tasks → AutoML service: executes · Jobs invoke AutoML workflows.
- Job tasks → Artifact service: persists · Jobs store outputs and artifacts.
- AutoML service → MLflow: logs runs · Training workflows record experiments and metrics.
- Artifact service → Path utils: manages paths · Artifact handling relies on filesystem helpers.
- Worker app → Worker config: loads · Worker startup reads runtime settings.
- Worker app → Worker logging: uses · Worker startup configures logging.
