Metadata-Version: 2.4
Name: ftaas
Version: 0.1.0
Summary: Fine Tuning as a Service — Python SDK (register → train → track → deploy)
Author-email: Ashish Verma <ashishodu2023@users.noreply.github.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/ashishodu2023/FTAAS
Project-URL: Repository, https://github.com/ashishodu2023/FTAAS
Project-URL: Issues, https://github.com/ashishodu2023/FTAAS/issues
Project-URL: Documentation, https://github.com/ashishodu2023/FTAAS#readme
Keywords: ftaas,fine-tuning,llm,lora,mlflow,ray,peft
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.9.0
Requires-Dist: pydantic-settings>=2.6.0
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: rich>=13.9.0
Requires-Dist: typer>=0.12.0
Requires-Dist: tenacity>=9.0.0
Provides-Extra: server
Requires-Dist: fastapi>=0.115.0; extra == "server"
Requires-Dist: uvicorn[standard]>=0.32.0; extra == "server"
Requires-Dist: sqlalchemy>=2.0.36; extra == "server"
Requires-Dist: aiosqlite>=0.20.0; extra == "server"
Requires-Dist: greenlet>=3.0.0; extra == "server"
Requires-Dist: python-multipart>=0.0.12; extra == "server"
Requires-Dist: jinja2>=3.1.4; extra == "server"
Requires-Dist: aiofiles>=24.1.0; extra == "server"
Requires-Dist: mlflow>=2.17.0; extra == "server"
Provides-Extra: train
Requires-Dist: transformers>=4.46.0; extra == "train"
Requires-Dist: datasets>=3.0.0; extra == "train"
Requires-Dist: peft>=0.13.0; extra == "train"
Requires-Dist: accelerate>=1.0.0; extra == "train"
Requires-Dist: trl>=0.12.0; extra == "train"
Requires-Dist: torch>=2.4.0; extra == "train"
Provides-Extra: ray
Requires-Dist: ray[default]>=2.37.0; extra == "ray"
Provides-Extra: all
Requires-Dist: ftaas[ray,server,train]; extra == "all"
Dynamic: license-file

# Fine Tuning as a Service (FTAAS)

**register → orchestrate → train (HF / TRL / LLaMA-Factory / Unsloth / Axolotl · LoRA / QLoRA / DoRA) → MLflow → vLLM / Ray Serve → API / Console**

```
ftaas.Client / notebook           Console
              \                    /
               ▼                  ▼
              FTAAS gateway  (:8080)
         ┌─────────┼──────────┐
         ▼         ▼          ▼
      registry   control    deploy
                   │
                workflow
                   │
            runner · Ray · MLflow · vLLM
```

## Components

| Module | Role |
|--------|------|
| **gateway** (`ftaas_app`) | Single process on `:8080` — Console + APIs |
| **console** | Web UI for setup, tracking, prompt |
| **registry** | Dataset registration → `id:version` |
| **control** | Fine-tune jobs + model registry |
| **workflow** | Pipeline create / complete |
| **deploy** | Endpoints (vLLM / Ray Serve path) + prompt API |
| **runner** | Local (or Airflow) train pipeline |
| **ftaas** SDK | `Client` for notebooks / automation |

## Quick start

```bash
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
./scripts/start_all.sh          # → http://127.0.0.1:8080
./scripts/e2e_smoke.sh
./scripts/stop_all.sh
```

## SDK

```python
from ftaas import Client, Framework, Technique, HyperParameters

with Client() as c:
    ds = c.register_dataset("examples/data/alpaca_sample.jsonl", name="alpaca")
    job = c.create_finetune_job(
        model_name="sshleifer/tiny-gpt2",
        dataset=ds,
        framework=Framework.TRANSFORMERS,
        technique=Technique.LORA,
        parameters=HyperParameters(max_steps=10),
    )
    job = c.wait_for_job(job.job_id)
    model = c.get_model(job.registered_model_name)
    ep = c.create_endpoint(model.model_name, inference_framework="vllm")
    print(c.prompt(ep.endpoint_id, "What is LoRA?").completion)
```

## Layout

```
FTAAS/
├── packages/ftaas_sdk/ftaas/   # Client SDK
├── services/
│   ├── ftaas_app/              # gateway
│   ├── registry/
│   ├── control/
│   ├── workflow/
│   └── deploy/
├── runner/                     # local + Airflow DAG
├── training/
├── ui/console/
├── examples/
└── scripts/
```

## License

Apache-2.0
