Nani4481/datacenter-thermal-env
๐ก๏ธ Hyperscale AI Data Center Thermal & Power Controller
Solving the Physical Bottleneck of AI Progress
    
๐ Overview
In the race to train the next generation of Frontier Models โ like Llama-4 or Gemini-3 โ the absolute biggest physical bottleneck isn't silicon. It's power and cooling.
Massive GPU clusters consume megawatts of electricity. If GPUs overheat, they undergo thermal throttling, killing training performance โ or worse, triggering hardware failure worth millions of dollars.
This project provides a high-fidelity OpenEnv environment that simulates a 2D grid of server racks. It challenges AI agents to act as Thermal & Power Controllers, balancing computational throughput with energy-efficient cooling while navigating hardware failures โ a real problem at the frontier of AI infrastructure.
๐๏ธ System Architecture
The environment models a complex, stateful thermodynamic system with realistic physics. To ensure stability during concurrent automated evaluations, the API backend implements a robust Least Recently Used (LRU) Cache for session memory management.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DATA CENTER SIMULATION GRID โ
โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโ
โ โ RACK R0 โ โ RACK R1 โ โ RACK R2 โ โ RACK R3 โโ
โ โ ๐ฅ 85ยฐC โโโโ ๐ก๏ธ 72ยฐC โโโโ โ
60ยฐC โโโโ โ
58ยฐC โโ
โ โ Load:90%โ โ Load:65%โ โ Load:40%โ โ Load:35%โโ
โ โโโโโโฌโโโโโโ โโโโโโฌโโโโโโ โโโโโโฌโโโโโโ โโโโโโฌโโโโโโโ
โ โ โ โ โ โ
โ โโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโ โ
โ โ HVAC ZONE H0 HVAC ZONE H1 โ โ
โ โ Output: 78% Output: 45% โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ๐ ๏ธ OpenEnv Specification
1. Observation Space โ DataCenterObservation
The agent receives a complete telemetry snapshot of the data center at every timestep, strictly typed via Pydantic:
class DataCenterObservation(BaseModel):
step: int
racks: List[RackState] # Per-rack telemetry (temp, load, status)
hvacs: List[HVACState] # HVAC zone status (output %, operational status)
current_pue: float # Power Usage Effectiveness
total_compute_kw: float
total_cooling_kw: float
load_imbalance: float # Max-rack load โ Min-rack load (%)
thermal_warnings: int # Racks exceeding 80ยฐC2. Action Space โ DataCenterAction
The agent controls the physical layer through three primary vectors:
class DataCenterAction(BaseModel):
hvac_adjustments: Dict[str, float] # Map of hvac_id to new cooling_output_percent (0-100)
workload_shifts: List[WorkloadShift] # Shift compute load: {from_rack, to_rack, amount_percent}
throttles: Dict[str, float] # Map of rack_id to throttle amount (reduce workload)โ ๏ธ throttles is a destructive action. Reducing workload saves hardware but sacrifices compute SLA. The agent must mathematically deduce when safe racks lack the capacity to absorb failing workloads and trigger throttles to survive.3. Reward Function (Strictly Bounded)
The reward signal is shaped to incentivize efficiency while penalizing risk. Per hackathon rules, all rewards and final grades are strictly clamped within the bounds of [0.01, 0.99].
$$R = \text{Clamp}_{0.01}^{0.99} \left( f(\text{PUE}) - 0.1 \times |\text{Warnings}| - 0.5 \times |\text{Violations}| \right)$$
๐ฏ Tasks & Difficulty
๐ Getting Started
Prerequisites
- Docker installed and running
- Python 3.12+
- Hugging Face Token (
HF_TOKEN): Required to authenticate via the Hugging Face inference router.
๐ณ Local Development
Step 1 โ Build the container:
docker build -t datacenter-env .Step 2 โ Run the FastAPI simulation server:
docker run -p 7860:7860 datacenter-envThe server implements an LRU Cache to safely handle up to 50 concurrent validation sessions without memory leaks.
Step 3 โ Run the inference agent (in a new terminal):
export HF_TOKEN="hf_your_token_here"
python inference.py๐ Baseline Results
Evaluated using Frontier-class reasoning models (Qwen-2.5-72B-Instruct / Llama-3.3-70B):
Note: High-reasoning models successfully utilize the throttles fallback action in the Hard task, proving the environment is legitimately solvable by LLMs reacting to state telemetry.๐ Project Structure
datacenter-env/
โโโ Dockerfile # Container definition & healthchecks
โโโ openenv.yaml # Standardized OpenEnv task configuration
โโโ datacenter_env.py # Core thermodynamics engine and strict Pydantic schemas
โโโ inference.py # Agent entry point with structured prompt engineering
โโโ server/
โโโ app.py # FastAPI server with memory-safe LRU caching๐ License
This project is licensed under the Apache License 2.0.
<div align="center">
Created for the Meta x Scaler OpenEnv 2026 Challenge ๐
Pushing the physical limits of AI infrastructure, one thermal cycle at a time.
</div>
