Skip to content

Seveneqqq/mlops-project

Repository files navigation

PL

Projekt MLOps — opis

Krótki opis

  • Repozytorium zawiera implementację projektu MLOps z elementami hurtowni danych i analityki: ETL, przechowywanie danych, opcjonalne trenowanie modelu, udostępnianie wyników przez API i dashboard, śledzenie eksperymentów (MLflow) oraz integrację z usługami chmurowymi.

Instalacja (lokalnie)

  1. Skopiuj plik środowiskowy jeśli istnieje:
    • cp .env.example .env
  2. Backend (Python):
    • python3 -m venv .venv
    • source .venv/bin/activate
    • pip install -r requirements.txt
  3. Frontend (TypeScript):
    • cd frontend
    • npm install
    • npm run dev
  4. Alternatywnie uruchom wszystkie usługi kontenerowo:
    • docker-compose up --build

Architektura (skrót)

  • Dane → ETL (src/) → Relacyjna baza danych (Azure DB lub inna)
  • Trening/ewaluacja (src/, MLflow) → rejestracja modeli (MLflow)
  • Model serving / API (FastAPI/Flask w src/) → Frontend (frontend/, TypeScript) / Dashboard
  • Artefakty i pliki → Azure Storage (Blob)
  • CI/CD: GitHub Actions → budowa i publikacja obrazów Docker → wdrożenie do Azure

Użyte technologie i narzędzia

  • Języki: Python, TypeScript
  • Containerization: Docker, docker-compose
  • CI/CD: GitHub Actions
  • Chmura / storage / DB: Microsoft Azure — Azure Storage (Blob), Azure Database (np. Azure SQL / Azure Database for PostgreSQL) i powiązane usługi
  • Eksperymenty i wersjonowanie modeli: MLflow
  • Web/API: FastAPI, Flask, Uvicorn / Waitress
  • Bazy danych i ORM: SQLAlchemy, ale także możliwość użycia pyodbc do połączeń ODBC
  • Autentykacja/autoryzacja: Supabase (SDK w requirements)
  • Dodatkowe: Alembic (migracje), Databricks SDK (jeśli używane), fsspec/pyarrow do pracy z plikami, opentelemetry (telemetria/monitoring)

Główne biblioteki (backend — z requirements.txt)

  • mlflow, mlflow-skinny
  • fastapi, Flask, uvicorn, waitress
  • SQLAlchemy, alembic, pyodbc
  • azure-core, azure-storage-blob
  • supabase, supabase-auth, supabase-functions
  • pandas, numpy, scikit-learn, scipy
  • pyarrow, fsspec
  • requests, httpx
  • opentelemetry-api, opentelemetry-sdk
  • docker, GitPython

Wdrażanie i CI/CD

  • Pipeline CI/CD: GitHub Actions (budowa, testy, budowa obrazów Docker, publikacja).
  • Konteneryzacja: obrazy Docker używane lokalnie i w pipeline.
  • Środowisko produkcyjne / storage: integracja z Microsoft Azure (Azure Storage dla artefaktów/artefakty, Azure DB dla danych).
  • Możliwe kroki wdrożenia: budowa obrazu → push do rejestru → wdrożenie do Azure (App Service / AKS / inne).

Uruchomienie podstawowe

  1. Ustawić zmienne środowiskowe w .env (połączenia do bazy, Azure storage connection string, MLflow config, Supabase keys).
  2. Uruchomić kontenery:
    • docker-compose up --build
  3. Dostęp:

Pliki konfiguracyjne do sprawdzenia

  • requirements.txt — lista zależności Python
  • docker-compose.yml, Dockerfile — obrazy i usługi
  • src/ — kod ETL, treningu, serwowania
  • frontend/ — kod frontendu (TypeScript)
  • mlflow/ — konfiguracja MLflow

EN

MLOps Project — description

Brief description

  • Repository implements an MLOps project with data-warehouse/analytics elements: ETL, data storage, optional model training, exposing results via API and dashboard, experiment tracking (MLflow) and cloud integrations.

Installation (local)

  1. Copy environment file if present:
    • cp .env.example .env
  2. Backend (Python):
    • python3 -m venv .venv
    • source .venv/bin/activate
    • pip install -r requirements.txt
  3. Frontend (TypeScript):
    • cd frontend
    • npm install
    • npm run dev
  4. Alternatively run all services with containers:
    • docker-compose up --build

Architecture (summary)

  • Data → ETL (src/) → Relational DB (Azure DB or other)
  • Training/evaluation (src/, MLflow) → model registry (MLflow)
  • Model serving / API (FastAPI/Flask in src/) → Frontend (frontend/, TypeScript) / Dashboard
  • Artifacts/files → Azure Storage (Blob)
  • CI/CD: GitHub Actions → build & push Docker images → deploy to Azure

Technologies and tools

  • Languages: Python, TypeScript
  • Containerization: Docker, docker-compose
  • CI/CD: GitHub Actions
  • Cloud / storage / DB: Microsoft Azure — Azure Storage (Blob), Azure Database (e.g., Azure SQL / Azure Database for PostgreSQL)
  • Experiment tracking & model versioning: MLflow
  • Web/API: FastAPI, Flask, Uvicorn / Waitress
  • DB and ORM: SQLAlchemy, pyodbc (ODBC connections supported)
  • Authentication/authorization: Supabase (SDK present)
  • Additional: Alembic (migrations), Databricks SDK, fsspec/pyarrow, OpenTelemetry

Key backend libraries (from requirements.txt)

  • mlflow, mlflow-skinny
  • fastapi, Flask, uvicorn, waitress
  • SQLAlchemy, alembic, pyodbc
  • azure-core, azure-storage-blob
  • supabase, supabase-auth, supabase-functions
  • pandas, numpy, scikit-learn, scipy
  • pyarrow, fsspec
  • requests, httpx
  • opentelemetry-api, opentelemetry-sdk
  • docker, GitPython

Deployment and CI/CD

  • CI/CD pipeline: GitHub Actions for build, tests, Docker image creation and publishing.
  • Containers: Docker images used locally and in CI.
  • Cloud integration: Microsoft Azure for storage (Blob) and database services.
  • Typical deployment flow: build image → push to registry → deploy to Azure (App Service / AKS / other target).

Basic run steps

  1. Configure environment variables in .env (DB connection strings, Azure storage keys, MLflow backend, Supabase keys).
  2. Start services:
    • docker-compose up --build
  3. Endpoints:

Config files to review

  • requirements.txt
  • docker-compose.yml, Dockerfile
  • src/
  • frontend/
  • mlflow/

About

University - mlops project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors