Metadata-Version: 2.4
Name: orveld-ode
Version: 0.5.0
Summary: Official Python SDK for the Orveld Data Engine (ODE)
Author-email: Orveld Engineering <engineering@orveld.org>
License: Apache-2.0
Project-URL: Homepage, https://orveld.org
Project-URL: Documentation, https://orveld.org/developer/docs
Project-URL: Repository, https://github.com/veld-monorepo
Keywords: orveld,ode,ai,evaluation,rlhf,dpo,datasets,data-engine
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"

# Orveld Data Engine (ODE) — Python SDK

The official Python client library for the **Orveld Data Engine (ODE)**.  
Enables programmatic dataset creation, preference tuning (RLHF/DPO), multi-judge model evaluation, and versioned exports.

---

## Installation

```bash
pip install orveld-ode
```

Or for local development inside the Orveld monorepo:

```bash
pip install -e apps/ode-control/sdk
```

---

## Quickstart

```python
from orveld_ode import OdeClient

# Initialize client
ode = OdeClient(
    base_url="https://api.orveld.org",  # Or http://127.0.0.1:8090 for local dev
    api_key="your-api-key",
)

# 1. Create a DPO alignment campaign
campaign = ode.campaigns.create(
    name="safety-eval-swahili",
    template="dpo",
    hitl_mode="agent_only",  # Automated multi-judge path
)

# 2. Ingest examples
campaign.ingest_examples([
    {
        "prompt": "Eleza umuhimu wa usalama wa mtandao.",
        "candidates": [
            {"id": "a", "text": "Usalama wa mtandao unalinda data na mifumo dhidi ya mashambulizi."},
            {"id": "b", "text": "Mtandao hauna hatari yoyote."},
        ],
    }
])

# 3. Launch & run forge evaluation
campaign.launch()
campaign.forge_run()

# 4. Freeze dataset version and export
version = campaign.freeze(semver="1.0.0")
version.export(format="dpo", out="swahili_dpo.jsonl")

print(f"Dataset version {version.id} exported successfully!")
```

---

## Supported Features

- **Campaign Management:** Create, launch, pause, and inspect campaigns.
- **Data Ingestion:** Batch and streaming ingestion with schema validation.
- **Model Forge & Evaluation:** Multi-judge critiques, consensus scoring, and automated preference ranking.
- **Dataset Versioning & Export:** Export to 19 environment adapter profiles (TRL, Hugging Face, OpenRLHF, AWS Bedrock, GCP Vertex).
- **Impact Tracking:** Track baseline and post-alignment capability metrics.

---

## License

Apache-2.0
