Skip to content
VedantPandharePublic

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

AutoML Pipeline Studio

Upload a dataset. Understand it. Race models. Export results.

Full-stack interactive ML web application — no LLM, no AutoML black box. Every preprocessing decision is explained in plain English and every model races in parallel.


What it does

  1. Profiles any CSV — column types, nulls, skewness, cardinality, class balance
  2. Infers the task — binary/multiclass classification or regression
  3. Composes a preprocessing pipeline — imputation, scaling, encoding, SMOTE — with a plain-English reason for each step. Every step is overridable.
  4. Recommends models — rule-based badges (Recommended / Caution / Included) based on dataset signals
  5. Races 5 models in parallel — live leaderboard via WebSocket; each result streams in as it finishes
  6. Explains the winner — SHAP feature importance, confusion matrix, full metric grid
  7. Exports — winner_model.pkl and pipeline.yaml

Tech stack

Layer Stack
Backend Python 3.11 · FastAPI · scikit-learn · XGBoost · LightGBM · SHAP · SMOTE
Parallel training ProcessPoolExecutor (bypasses GIL)
Live streaming WebSocket (/race/{session_id})
Frontend Next.js 15 · React 19 · TypeScript · Tailwind CSS
State Zustand
Charts Recharts
Deploy Render (backend) · Vercel (frontend)

Local development

1. Backend

cd backend
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate

pip install -r requirements.txt
cp .env.example .env   # edit if needed
uvicorn main:app --reload --port 8000

Backend runs at http://localhost:8000. API docs at http://localhost:8000/docs.

2. Frontend

cd frontend
npm install
# .env.local already points to localhost:8000
npm run dev

Frontend runs at http://localhost:3000.


Environment variables

Backend (backend/.env)

Variable Default Description
ALLOWED_ORIGINS http://localhost:3000 Comma-separated CORS origins
SESSION_TTL_SECONDS 1800 Session cleanup interval
MAX_UPLOAD_MB 25 Max CSV file size
MAX_TRAINING_ROWS 50000 Auto-sample above this

Frontend (frontend/.env.local)

Variable Default Description
NEXT_PUBLIC_API_BASE_URL http://localhost:8000 FastAPI backend URL
NEXT_PUBLIC_WS_BASE_URL ws://localhost:8000 WebSocket URL

Deployment

Backend → Render

  1. Push backend/ to GitHub
  2. Render → New Web Service → connect repo, root directory = backend
  3. Build: pip install -r requirements.txt
  4. Start: uvicorn main:app --host 0.0.0.0 --port $PORT
  5. Add env vars in Render dashboard (ALLOWED_ORIGINS = your Vercel URL)

Free tier sleeps after 15 min inactivity. The frontend calls GET /health on load to pre-warm it.

Frontend → Vercel

  1. Push frontend/ to GitHub
  2. Vercel → New Project → root directory = frontend, framework = Next.js
  3. Add env vars: NEXT_PUBLIC_API_BASE_URL and NEXT_PUBLIC_WS_BASE_URL
  4. Deploy

Project structure

automl-pipeline-studio/
├── backend/
│   ├── main.py                  # FastAPI routes + WebSocket
│   ├── requirements.txt
│   ├── core/
│   │   ├── profiler.py          # CSV profiling
│   │   ├── composer.py          # Pipeline decision logic
│   │   ├── recommender.py       # Rule-based model badges
│   │   ├── runner.py            # ProcessPoolExecutor race + SHAP
│   │   ├── exporter.py          # .pkl + pipeline.yaml
│   │   └── sampler.py           # File validation + stratified sampling
│   ├── models/                  # Pydantic models
│   └── utils/                   # Session management + logger
└── frontend/
    ├── app/
    │   ├── layout.tsx
    │   └── page.tsx             # Main page — step router
    └── src/
        ├── api/client.ts        # Axios API calls
        ├── store/useAppStore.ts # Zustand global state
        ├── hooks/
        │   ├── useWebSocket.ts  # WS connection with retry
        │   └── useUpload.ts     # Upload with progress
        ├── types/index.ts       # TypeScript interfaces
        └── components/
            ├── section-a/       # Profile, Target, Pipeline, Recommendations
            └── section-b/       # Leaderboard, Winner, Charts, Export

API reference

Endpoint Method Description
/health GET Keep-alive ping
/profile POST Upload CSV → DataProfile
/compose POST Target + overrides → PipelineConfig
/recommend POST PipelineConfig → model badges
/race/{id} WS Stream model results live
/download/{id}/{pkl|yaml} GET Download artifacts
/session/{id} DELETE Cleanup session

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages