Skip to content

lambdatheta

OpenEnv environment for training a trader in a scarce-GPU market with scripted background actors, hidden incentives, delayed rewards, and partial observability.

Core trick

A trained allocator bids for scarce GPU capacity against scripted tenants and a broker, with rewards delayed until jobs complete.

Tags

Description

OpenEnv environment for training a trader in a scarce-GPU market with scripted background actors, hidden incentives, delayed rewards, and partial observability.
kiankyars/lambdatheta★ 10 forksJupyter NotebookCreated Mar 8, 2026 · last push Mar 9, 2026

README excerpt

---
title: Compute Market Environment Server
emoji: 📊
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
app_port: 8000
base_path: /web
tags:
  - openenv
  - multi-agent
  - compute-allocation
  - market-simulation
---

# Compute Market Environment

An OpenEnv environment for training a single allocator/trader in a scarce-GPU market with scripted background actors, hidden incentives, delayed rewards, and partial observability.

## What v1 implements

- One trained agent: the allocator/trader
- Scripted counterparties: urgent tenant, cost-sensitive tenant, broker
- Jobs with deadlines, value, dependencies, and delayed payoff
- Actions: `bid_for_capacity`, `accept_offer`, `propose_swap`, `schedule_job`, `delay_job`, `inspect_market`, `noop`
- Reward = completed job value minus compute spend, missed-deadline penalties, and idle-hoarding penalties
- Separate training helper for TRL/Colab in `training/minimal_grpo_rollout.py`

## Quick Start

```python
from compute_market_env import ComputeMarketAction, ComputeMarketEnv

with ComputeMarketEnv(base_url="http://localhost:8000") as env:
    result = env.reset(seed=7)
    print(result.observation.market_price)
    print(result.observation.free_gpus)

    result = env.step(
        ComputeMarketAction(
            action_type="bid_for_capacity",
            gpu_count=4,
            price_per_gpu=6.5,
            duration=3,
        )
    )
    print(result.reward)
    print(result.observation.budget_remaining)
```

## Local Devel

Team