--- title: DriftCall emoji: ๐ŸŒ€ colorFrom: indigo colorTo: pink sdk: docker pinned: true license: apache-2.0 short_description: OpenEnv env + site ยท canonical /reset ยท one Space tags: - openenv - rl - voice - indic - schema-drift - grpo - gemma-3n --- # DriftCall โ€” Unified Space One HF Space serving the OpenEnv-compliant DriftCall env **and** the project site, both under the same hostname. OpenEnv routes are at the canonical bare paths (no `/api` prefix), so the registry and the gym client see this Space exactly as it sees the dedicated env Space. ## URL surface | Path | Method | What it does | |------------------|----------|--------------| | `/` | `GET` | static project site (Vite-built React + pretext) | | `/assets/*` | `GET` | site bundle (CSS, JS, fonts) | | `/healthz` | `GET` | OpenEnv health probe (`text/plain "ok"`) | | `/reset` | `POST` | OpenEnv reset (bearer auth + X-Session-Id) | | `/step` | `POST` | OpenEnv step | | `/state` | `GET` | OpenEnv read-only state | | `/close` | `POST` | OpenEnv close session | | `/openenv.yaml` | `GET` | the manifest (served from disk) | | `/demo` | `GET` | 302 โ†’ dedicated Gradio demo Space | The OpenEnv routes do not collide with the static frontend because they are HTTP verb-specific (`POST /reset`, `POST /step`, `POST /close`, plus `GET /healthz` and `GET /state`) โ€” Vite-emitted assets live under `/assets/*` and never overlap. ## Why both, not separate? The dedicated env Space (`DGXAI/driftcall-env`) and project site (`DGXAI/driftcall-site`) still exist as canonical, isolated artefacts. This Space is an **additive** convenience for hackathon judging: land at one URL and you see the project, can hit the reward function endpoint, and get redirected to the demo. The Gradio demo stays separate because it's GPU-heavy and benefits from its own scaling. ## What's bundled Self-contained โ€” the build dir for this Space contains everything it needs to run, with no references to anything outside it: ``` unified_space/build/ โ”œโ”€โ”€ app.py โ† canonical OpenEnv FastAPI (verbatim copy) โ”œโ”€โ”€ unified_app.py โ† extends app.py + adds static mount + /demo redirect โ”œโ”€โ”€ openenv.yaml โ† OpenEnv v1.0 manifest โ”œโ”€โ”€ requirements.txt โ† runtime deps (no training stack) โ”œโ”€โ”€ Dockerfile โ† multi-stage CPU image, Kokoro + faster-whisper baked โ”œโ”€โ”€ cells/ โ† DriftCallEnv + 5 reward components + drift + audio โ”œโ”€โ”€ data/ โ† briefs, drift patterns, API schemas โ””โ”€โ”€ site/ โ† Vite-built React dist (frontend) ``` Build + push with `bash deploy/unified_space/build.sh --push` from the repo root. ## OpenEnv compliance - Manifest: served at `/openenv.yaml` - Endpoints: bare-path canonical (`/reset`, `/step`, `/state`, `/close`, `/healthz`) - Auth: bearer (`DRIFTCALL_ENV_TOKEN`) + `X-Session-Id` header on mutating calls - Action / Observation refs: `cells.step_04_models:DriftCallAction` / `cells.step_04_models:DriftCallObservation` - Reward: 5 components (R1..R5) with weights, calibration via Brier + uncertain floor โ€” see `cells/step_08_rewards.py` and the openenv.yaml reward block.