ARYANPATEL-BIT commited on
Commit
6b9ce4b
·
1 Parent(s): 8562968

created README.md file

Browse files
Files changed (1) hide show
  1. README.md +79 -232
README.md CHANGED
@@ -1,293 +1,140 @@
1
- # ☁️ DevOps/FinOps Cloud Optimizer — OpenEnv Environment
2
 
3
  **An AI agent environment where models learn to optimize cloud infrastructure cost vs. performance under realistic operational constraints.**
4
 
5
  ---
6
 
7
- ## 1. Environment Description & Motivation
8
 
9
- Cloud infrastructure is the single largest variable cost for most software companies. In 2025, global cloud spend exceeded $800B — and an estimated 30% of it is wasted on over-provisioned, idle, or misconfigured resources (Flexera State of the Cloud Report).
10
 
11
- **FinOps** (Financial Operations) is the discipline of making cloud spending decisions based on data. This environment simulates a fleet of cloud servers running production workloads across **4 resource dimensions** (CPU, RAM, disk IOPS, network bandwidth). The agent observes real-time utilization, latency, cost, and SLA status — then takes infrastructure actions to minimize cost while keeping everything healthy.
12
 
13
- ### What makes this environment unique
 
 
 
 
14
 
15
- - **4-dimensional resource model:** CPU, RAM, disk IOPS, and network bandwidth. A server can be overloaded on any dimension, creating non-obvious bottlenecks.
16
- - **11 instance types** including specialized tiers (compute-optimized, memory-optimized, storage-optimized) and **spot instances** that are 70% cheaper but can be deterministically evicted.
17
- - **Cascading failures:** Workloads can depend on other workloads. If a dependency breaches SLA or goes down, the dependent's latency inflates by 1.5×.
18
- - **Deterministic traffic spikes:** When a seed is provided, workload demands fluctuate per step (range 0.85×–1.45×), testing adaptive reasoning.
19
- - **Procedural task generation:** Beyond the 3 fixed tasks, unlimited evaluation scenarios via `task_id="random"` + seed.
20
- - **Session management:** Multiple concurrent agents can run independently via session IDs.
21
-
22
- ### Why this matters for RL/GRPO training
23
-
24
- - **Multi-objective optimization:** Cost and performance are in tension. The reward function gives continuous signal with partial credit across the full trajectory.
25
- - **Sequential decision-making with ordering constraints:** You can't terminate before migrating. You can't migrate without free capacity. Actions must be sequenced correctly.
26
- - **Novel mechanics:** Spot eviction forces planning around failure modes. Cascading failures require understanding dependency graphs. Traffic spikes require adaptive resource allocation.
27
- - **Generalization pressure:** Procedural generation prevents memorization. Agents must learn transferable strategies.
28
- - **Deterministic grading:** Same actions always produce the same score. No randomness, no hidden state.
29
 
30
  ---
31
 
32
  ## 2. Observation Space
33
 
34
- Every step, the agent receives a full snapshot of the infrastructure:
35
-
36
- | Field | Type | Description |
37
- |---|---|---|
38
- | `servers` | `List[ServerInfo]` | All active server instances (see sub-fields) |
39
- | `workloads` | `List[WorkloadInfo]` | All workloads that must be kept running |
40
- | `total_cost_per_hour` | `float` | Sum of all running server costs in USD/hr |
41
- | `budget_per_hour` | `float` | Target budget the agent should optimize toward |
42
- | `sla_violations` | `int` | Workloads currently breaching latency SLA |
43
- | `unassigned_workloads` | `int` | Workloads not running on any server (DOWN) |
44
- | `step_number` | `int` | Current step in episode (0-indexed) |
45
- | `max_steps` | `int` | Maximum steps before episode ends |
46
- | `done` | `bool` | True if the episode is over |
47
- | `message` | `str` | Structured feedback: `[OK]`, `[ERROR:*]`, `[WARN:*]`, `[DESTRUCTIVE]`, `[EVICTION]` |
48
- | `traffic_multiplier_active` | `bool` | True if seed-based traffic fluctuation is active |
49
- | `spot_eviction_occurred` | `bool` | True if a spot instance was evicted this step |
50
-
51
- ### ServerInfo sub-fields
52
-
53
- | Field | Type | Description |
54
- |---|---|---|
55
- | `server_id` | `str` | Unique identifier (e.g. `"srv-001"`) |
56
- | `instance_type` | `str` | One of 11 instance types (see catalog below) |
57
- | `cpu_cores` | `int` | Number of vCPU cores |
58
- | `ram_gb` | `int` | RAM in GB |
59
- | `disk_iops` | `int` | Disk I/O operations per second |
60
- | `network_gbps` | `float` | Network bandwidth in Gbps |
61
- | `cpu_utilization` | `float` | Current CPU usage (**uncapped** — can exceed 1.0 when overloaded) |
62
- | `ram_utilization` | `float` | Current RAM usage (uncapped) |
63
- | `disk_utilization` | `float` | Current disk usage (uncapped) |
64
- | `network_utilization` | `float` | Current network usage (uncapped) |
65
- | `cost_per_hour` | `float` | Hourly cost in USD |
66
- | `assigned_workloads` | `List[str]` | Workload IDs running on this server |
67
- | `is_spot` | `bool` | True if spot instance (can be evicted) |
68
- | `is_overloaded` | `bool` | True if any resource dimension exceeds 100% |
69
-
70
- ### WorkloadInfo sub-fields
71
-
72
- | Field | Type | Description |
73
- |---|---|---|
74
- | `workload_id` | `str` | Unique identifier (e.g. `"wl-api"`) |
75
- | `name` | `str` | Human-readable name |
76
- | `required_cpu` | `float` | Minimum CPU cores needed |
77
- | `required_ram` | `float` | Minimum RAM in GB |
78
- | `required_disk_iops` | `int` | Minimum disk IOPS needed |
79
- | `required_net_gbps` | `float` | Minimum network Gbps needed |
80
- | `current_latency_ms` | `float` | Current p95 latency in ms |
81
- | `sla_latency_ms` | `float` | Maximum acceptable latency |
82
- | `is_critical` | `bool` | If true, SLA breach carries 2× penalty weight |
83
- | `assigned_server` | `str \| null` | Server ID, or `null` if unassigned |
84
- | `dependencies` | `List[str]` | Workload IDs this workload depends on |
85
-
86
- ### Instance Type Catalog (11 types)
87
-
88
- | Type | CPU | RAM | Disk IOPS | Network | Cost/hr | Notes |
89
- |---|---|---|---|---|---|---|
90
- | `nano` | 1 | 1 GB | 1,000 | 0.5 Gbps | $0.05 | Minimal |
91
- | `micro` | 1 | 2 GB | 2,000 | 0.5 Gbps | $0.10 | Light workloads |
92
- | `small` | 2 | 4 GB | 3,000 | 1.0 Gbps | $0.20 | General purpose |
93
- | `medium` | 4 | 8 GB | 5,000 | 2.0 Gbps | $0.40 | General purpose |
94
- | `large` | 8 | 16 GB | 10,000 | 5.0 Gbps | $0.80 | Heavy workloads |
95
- | `xlarge` | 16 | 32 GB | 20,000 | 10.0 Gbps | $1.60 | Maximum capacity |
96
- | `compute-opt` | 8 | 8 GB | 5,000 | 5.0 Gbps | $0.60 | High CPU, low RAM |
97
- | `memory-opt` | 4 | 32 GB | 10,000 | 2.0 Gbps | $0.70 | High RAM |
98
- | `storage-opt` | 4 | 8 GB | 30,000 | 2.0 Gbps | $0.55 | High disk IOPS |
99
- | `spot-medium` | 4 | 8 GB | 5,000 | 2.0 Gbps | **$0.12** | ⚡ 70% cheaper, **can be evicted** |
100
- | `spot-large` | 8 | 16 GB | 10,000 | 5.0 Gbps | **$0.24** | ⚡ 70% cheaper, **can be evicted** |
101
-
102
- ---
103
 
104
- ## 3. Action Space
 
 
 
 
105
 
106
- Each step, the agent submits exactly one action:
 
 
 
 
 
107
 
108
- | Action | Required Fields | Effect | Risk |
109
- |---|---|---|---|
110
- | `provision` | `instance_type` | Creates a new empty server | Increases cost without benefit if nothing migrated to it |
111
- | `terminate` | `server_id` | Destroys a server permanently | **Orphans all workloads** — 0.50 penalty per occurrence |
112
- | `resize` | `server_id`, `instance_type` | Changes instance type in-place | May cause SLA breach if downsized too aggressively |
113
- | `migrate` | `workload_id`, `target_server_id` | Moves a workload to another server | Target may become overloaded. Capacity warnings shown |
114
- | `noop` | — | Does nothing | Wastes a step. 3+ consecutive noops incur escalating penalty |
115
 
116
  ---
117
 
118
- ## 4. Reward Function
119
-
120
- ```
121
- score = (cost_efficiency × 0.40) + (performance × 0.35) − (penalty × 0.25)
122
- ```
123
-
124
- Clamped to **[0.0, 1.0]**. Fully deterministic. If performance = 0 (all workloads unhealthy), cost_efficiency is zeroed — you can't score well by just cutting costs.
125
-
126
- ### Cost Efficiency (40% weight)
127
-
128
- | Condition | Score |
129
- |---|---|
130
- | Zero cost | 1.00 |
131
- | 50% of budget | 0.95 |
132
- | At budget | 0.90 |
133
- | 1.5× budget | 0.45 |
134
- | 2× budget or more | 0.00 |
135
-
136
- ### Performance Score (35% weight)
137
-
138
- Weighted fraction of workloads that are assigned AND meeting SLA. Critical workloads carry 2× weight.
139
 
140
- ### Penalty (25% weight — severe)
141
 
142
- | Source | Amount | Notes |
143
- |---|---|---|
144
- | Repeated identical non-noop action | +0.15 per repeat | Prevents loops (noops excluded) |
145
- | Consecutive non-noop loop (3+) | +0.10 per iteration | Extra penalty for action loops |
146
- | **Destructive termination** | **+0.50** per occurrence | Orphaning workloads is catastrophic |
147
- | All-noop idleness | +0.05 per noop beyond 2 | Only if agent did zero useful actions |
148
- | 2+ provisions without migration | +0.10 | Prevents mindless provisioning |
149
 
150
  ---
151
 
152
- ## 5. Novel Mechanics
153
-
154
- ### Spot Instance Eviction
155
 
156
- Spot instances (`spot-medium`, `spot-large`) cost 70% less but can be **evicted** at steps 3, 7, and 12. Eviction is deterministic (based on server ID hash), so agents can learn to predict and plan around it. Evicted servers are removed; all workloads on them become orphaned.
157
 
158
- ### Cascading Failures
 
 
159
 
160
- Workloads can declare `dependencies`. If a dependency is DOWN (unassigned) or breaching SLA, the dependent workload's latency is inflated by 1.5× per failing dependency. This creates chains where fixing one root cause resolves multiple SLA violations.
 
 
161
 
162
- ### Traffic Spikes
 
 
163
 
164
- When a `seed` is provided at `/reset`, workload resource demands fluctuate per step (deterministic range: 0.85×–1.45×). This forces agents to build in headroom rather than right-sizing to exact capacity.
165
-
166
- ### 4D Resource Bottlenecks
167
-
168
- Latency is driven by the **worst** resource dimension: `max(CPU%, RAM%, disk%, network%)`. A server with low CPU but saturated disk IOPS will breach SLA just like a CPU-overloaded one.
169
 
170
  ---
171
 
172
- ## 6. Tasks
173
-
174
- ### Task 1: Single Server Rightsizing (Easy)
175
-
176
- | | |
177
- |---|---|
178
- | **Max Steps** | 5 |
179
- | **Budget** | $0.25/hr |
180
- | **Objective** | Resize an xlarge server ($1.60/hr) running 2 workloads (0.5+1.0 CPU, 1.0+1.5 GB RAM) to the smallest instance that keeps both SLAs met |
181
-
182
- **What a good agent does:** Resizes to `small` (2 CPU, 4 GB). Both workloads fit. Cost drops from $1.60 to $0.20.
183
-
184
- **Why it's not trivial:** Agent must verify BOTH workloads fit — `micro` (1 CPU) causes CPU overload and SLA breach.
185
-
186
- ### Task 2: Multi-Service Consolidation (Medium)
187
-
188
- | | |
189
- |---|---|
190
- | **Max Steps** | 10 |
191
- | **Budget** | $0.50/hr |
192
- | **Objective** | Consolidate 4 workloads from 4 oversized servers ($2.40/hr) with cascading dependency (wl-api→wl-db) |
193
-
194
- ### Task 3: Fleet Chaos Triage (Hard)
195
 
196
- | | |
197
- |---|---|
198
- | **Max Steps** | 15 |
199
- | **Budget** | $1.20/hr |
200
- | **Objective** | Fix a broken fleet — 3 SLA breaches, 1 orphaned workload, cascading failures (wl-api→wl-auth, wl-search→wl-db), 1 idle server |
201
-
202
- **Optimal:** Consolidate onto `large` + `medium` ($1.20/hr). Requires 8–12 carefully ordered actions.
203
-
204
- ### Task 4: Procedural Generation (Variable)
205
-
206
- ```bash
207
- curl -X POST http://localhost:7860/reset \
208
- -d '{"task_id": "random", "seed": 42}'
209
- ```
210
-
211
- Generates a unique fleet configuration from the seed. Server count (3–7), workload count (4–8), resource requirements, dependencies, and budget are all randomized. Same seed always produces the same scenario.
212
-
213
- ---
214
-
215
- ## 7. Local Setup
216
 
 
217
  ```bash
218
- # 1. Clone and set up
219
  git clone <repo-url> && cd <repo-dir>
220
- python -m venv venv && source venv/bin/activate # or .\venv\Scripts\activate on Windows
221
  pip install -r requirements.txt
222
 
223
- # 2. Run tests
224
  python test_env.py
225
 
226
- # 3. Start environment
227
  python env.py
228
- # Server starts at http://localhost:7860
229
-
230
- # 4. Test (separate terminal)
231
- curl -X POST http://localhost:7860/reset -H "Content-Type: application/json" -d '{"task_id": "easy"}'
232
-
233
- # 5. View dashboard
234
- # Open http://localhost:7860/dashboard?session_id=YOUR_SESSION_ID
235
  ```
236
 
237
- ---
238
-
239
- ## 8. Docker Setup
240
-
241
  ```bash
242
  docker build -t openenv-devops .
243
  docker run -p 7860:7860 openenv-devops
244
- curl -X POST http://localhost:7860/reset -d '{"task_id": "easy"}'
245
  ```
246
 
247
- ---
248
-
249
- ## 9. Running Inference
 
250
 
 
 
251
  ```bash
252
- export API_BASE_URL="https://router.huggingface.co/v1"
253
  export MODEL_NAME="meta-llama/Llama-3.1-8B-Instruct"
254
- export HF_TOKEN="hf_your_token_here"
255
- export ENV_URL="http://localhost:7860"
256
  python inference.py
257
  ```
258
 
259
- Typical runtime: **2–3 minutes** on 2 vCPU / 8 GB RAM.
260
-
261
  ---
262
 
263
- ## 10. Baseline Scores
264
 
265
- | Task | Difficulty | Max Steps | Budget | Baseline (LLM) | Random Agent |
266
- |---|---|---|---|---|---|
267
- | Single Server Rightsizing | 🟢 Easy | 5 | $0.25/hr | 0.65–0.75 | ~0.15–0.30 |
268
- | Multi-Service Consolidation | 🟡 Medium | 10 | $0.50/hr | 0.40–0.55 | ~0.10–0.20 |
269
- | Fleet Chaos Triage | 🔴 Hard | 15 | $1.20/hr | 0.25–0.40 | ~0.05–0.15 |
270
 
271
- All scores are deterministic: same actions → same score, always.
272
-
273
- ---
274
-
275
- ## API Reference
276
-
277
- | Endpoint | Method | Body | Returns |
278
- |---|---|---|---|
279
- | `/reset` | POST | `{"task_id": "easy\|medium\|hard\|random", "seed": <int>}` | `{session_id, ...Observation}` |
280
- | `/step` | POST | `Action JSON` + `?session_id=ID` | `{observation, reward, done, info}` |
281
- | `/state` | GET | `?session_id=ID` | Full state with action history |
282
- | `/dashboard` | GET | `?session_id=ID` | Live HTML dashboard |
283
-
284
- ---
285
 
286
- ## Technical Stack
 
 
 
 
287
 
288
- - **Python 3.11** + **FastAPI** + **Pydantic v2** + **uvicorn**
289
- - **OpenAI client** for LLM inference (any OpenAI-format API)
290
- - **Zero ML dependencies** in the environment itself
291
- - **Fully deterministic** grading — no randomness anywhere
292
- - **Single-file environment** (`env.py`) — models, tasks, grading, server, and dashboard
293
- - **14 test suites** (`test_env.py`) with 50+ assertions covering all mechanics
 
1
+ # ☁️ OpenEnv: DevOps/FinOps Cloud Optimizer
2
 
3
  **An AI agent environment where models learn to optimize cloud infrastructure cost vs. performance under realistic operational constraints.**
4
 
5
  ---
6
 
7
+ ## 1. Environment Overview & Motivation
8
 
9
+ Cloud infrastructure is often the largest variable cost for software companies. FinOps (Financial Operations) is the discipline of maximizing cloud value, but today, these decisions rely heavily on engineers manually triaging dashboards.
10
 
11
+ This OpenEnv environment challenges AI agents to automate FinOps. It simulates a fleet of cloud servers running production workloads across a **4-dimensional resource model** (CPU, RAM, disk IOPS, network bandwidth). The agent observes real-time utilization, latency, cost, and SLA status, and takes infrastructure actions to minimize cost without sacrificing reliability.
12
 
13
+ ### Key Environment Mechanics (v2.0)
14
+ * **4-Dimensional Resources:** Servers and workloads are defined by CPU, RAM, Disk IOPS, and Network. A bottleneck in *any* dimension causes SLA breaches.
15
+ * **11 Instance Types:** Ranges from standard computing to specialized tiers (compute-optimized, memory-optimized) and **Spot Instances** (70% cheaper but deterministically evicted, penalizing greedy agents).
16
+ * **Cascading Failures:** Workloads have dependency graphs (e.g., API depends on Database). If a dependency goes down, the reliant workload suffers latency penalties.
17
+ * **Traffic Spikes:** Seed-based deterministic demand fluctuations test an agent's ability to provision adaptively.
18
 
19
+ ### Why this is a great benchmark for RL/GRPO:
20
+ * **Multi-objective Optimization:** The reward function places cost and performance in tension. Continuous partial credit accurately measures reasoning capability.
21
+ * **Complex Sequential Decisions:** Agents must migrate workloads before terminating servers, requiring strong planning.
22
+ * **100% Deterministic:** Pure stateless reasoning benchmark. The exact same actions always yield the exact same score.
 
 
 
 
 
 
 
 
 
 
23
 
24
  ---
25
 
26
  ## 2. Observation Space
27
 
28
+ At every step, the agent receives a comprehensive snapshot of the cloud infrastructure:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
+ ### Global State
31
+ * `total_cost_per_hour`: Sum of running servers in USD/hr.
32
+ * `budget_per_hour`: Target FinOps budget constraint.
33
+ * `sla_violations`: Number of workloads breaching latency SLA.
34
+ * `unassigned_workloads`: Number of workloads currently completely DOWN.
35
 
36
+ ### Servers (`List[ServerInfo]`)
37
+ A list of all active servers, including attributes like:
38
+ * `server_id` and `instance_type`.
39
+ * Capacity metrics: `cpu_cores`, `ram_gb`, `disk_iops`, `network_gbps`.
40
+ * Current utilization: `cpu_utilization`, `ram_utilization`, `disk_utilization`, `network_utilization` (uncapped, can exceed 100% when overloaded).
41
+ * Status flags: `is_spot`, `is_overloaded`.
42
 
43
+ ### Workloads (`List[WorkloadInfo]`)
44
+ The apps that must stay online, including attributes like:
45
+ * `workload_id` and semantic `name`.
46
+ * Demand metrics minimums (CPU, RAM, Disk, Net).
47
+ * SLA Tracking: `current_latency_ms` vs. `sla_latency_ms`.
48
+ * Status flags: `is_critical` (2x penalty if SLA breached), `dependencies` (cascading failures).
 
49
 
50
  ---
51
 
52
+ ## 3. Action Space
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
+ Every step, the agent outputs exactly one JSON action specifying the infrastructure operation.
55
 
56
+ | Action Type | Required Parameters | Description & Risks |
57
+ | :--- | :--- | :--- |
58
+ | `provision` | `instance_type` | Spawns a new server. (Increases cost, requires migration to utilize). |
59
+ | `terminate` | `server_id` | Permanently destroys a server. (**Danger:** Orphans all workloads to it, applying a massive 0.50 penalty). |
60
+ | `resize` | `server_id`, `instance_type`| Changes the tier in-place. (Requires ensuring workloads still fit). |
61
+ | `migrate` | `workload_id`, `target_server_id` | Moves a workload. (Target server may become overloaded). |
62
+ | `noop` | *None* | Do nothing. (Wastes a step. 3 consecutive noops incur a penalty). |
63
 
64
  ---
65
 
66
+ ## 4. Task Descriptions & Difficulty Levels
 
 
67
 
68
+ The environment offers three statically defined tasks of increasing complexity, plus procedural generation.
69
 
70
+ ### 🟢 Target 1: Single Server Rightsizing (Easy)
71
+ * **Budget:** $0.25/hr | **Max Steps:** 5
72
+ * **Objective:** Two workloads are running on a massively over-provisioned `xlarge` server costing $1.60/hr. The agent must resize to the smallest instance that supports both without breaching SLAs.
73
 
74
+ ### 🟡 Target 2: Multi-Service Consolidation (Medium)
75
+ * **Budget:** $0.50/hr | **Max Steps:** 10
76
+ * **Objective:** Four workloads are isolated on their own oversized servers (total $2.40/hr). The agent must migrate workloads to consolidate them onto fewer servers, navigating a cascading dependency from the API layer to the database.
77
 
78
+ ### 🔴 Target 3: Fleet Chaos Triage (Hard)
79
+ * **Budget:** $1.20/hr | **Max Steps:** 15
80
+ * **Objective:** The agent enters a completely broken fleet. There are 3 immediate SLA breaches, 1 orphaned workload offline, cascading database failures, and gross over-provisioning elsewhere. Fixing this requires 8-12 perfectly sequenced migration and resize actions.
81
 
82
+ ### 🎲 Procedural Generation (Unlimited)
83
+ By passing `task_id="random"` and a `seed`, the environment dynamically generates a fleet configuration, varying server capacity, dependencies, and SLAs, preventing models from simply memorizing the deterministic tasks.
 
 
 
84
 
85
  ---
86
 
87
+ ## 5. Setup and Usage Instructions
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
 
89
+ The environment has zero ML dependencies (FastAPI only) and acts as a localized standalone REST API.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
 
91
+ ### Local Setup (Python 3.11+)
92
  ```bash
93
+ # 1. Clone & prepare environment
94
  git clone <repo-url> && cd <repo-dir>
95
+ python -m venv venv && source venv/bin/activate
96
  pip install -r requirements.txt
97
 
98
+ # 2. Run unit tests to validate grading determinism
99
  python test_env.py
100
 
101
+ # 3. Start the environment server (Runs on port 7860)
102
  python env.py
 
 
 
 
 
 
 
103
  ```
104
 
105
+ ### Docker Setup
 
 
 
106
  ```bash
107
  docker build -t openenv-devops .
108
  docker run -p 7860:7860 openenv-devops
 
109
  ```
110
 
111
+ ### Testing the Interactive Dashboard
112
+ The repository includes a localized HTML Dashboard to visualize action executions.
113
+ 1. Create a session: `curl -X POST http://localhost:7860/reset -d '{"task_id": "easy"}'`
114
+ 2. Open your browser directly to: `http://localhost:7860/dashboard`
115
 
116
+ ### Running Inference Script (LLM Evaluation)
117
+ To run the provided `inference.py` script against the environment:
118
  ```bash
119
+ export API_BASE_URL="https://router.huggingface.co/v1" # Or any OpenAI-format base URL
120
  export MODEL_NAME="meta-llama/Llama-3.1-8B-Instruct"
121
+ export HF_TOKEN="your_huggingface_token"
122
+
123
  python inference.py
124
  ```
125
 
 
 
126
  ---
127
 
128
+ ## 6. Baseline Performance Scores
129
 
130
+ Scores are clamped perfectly to `[0.0, 1.0]` based on: `(Cost Efficiency × 0.40) + (SLA Performance × 0.35) - (Penalty × 0.25)`.
 
 
 
 
131
 
132
+ *Because grading is purely deterministic, an identical action trajectory will consistently produce these results.*
 
 
 
 
 
 
 
 
 
 
 
 
 
133
 
134
+ | Task | Difficulty | Max Steps | Budget | Standard Baseline (Llama 3.1 8B) | Random Baseline (Random Action Picks) |
135
+ | :--- | :--- | :--- | :--- | :--- | :--- |
136
+ | **Rightsizing** | 🟢 Easy | 5 | $0.25/hr | **0.65 – 0.75** | ~0.15 – 0.30 |
137
+ | **Consolidation**| 🟡 Medium | 10 | $0.50/hr | **0.40 – 0.55** | ~0.10 – 0.20 |
138
+ | **Chaos Triage** | 🔴 Hard | 15 | $1.20/hr | **0.25 – 0.40** | ~0.05 – 0.15 |
139
 
140
+ *Note: For a model to achieve perfect scores (0.90+) on Chaos Triage, it must perfectly orchestrate the sequence of bottleneck identification, migration target validation, dependency ordering, and capacity planning. This is explicitly designed to be structurally rigorous.*