CoBeDigger commited on
Commit
efaec4a
Β·
1 Parent(s): 1f7d3cf

docs: hackathon-ready README with training evidence and 4-stage cascade

Browse files
Files changed (2) hide show
  1. README.md +169 -113
  2. openenv.yaml +12 -8
README.md CHANGED
@@ -11,95 +11,140 @@ tags:
11
  - ml
12
  - data-engineering
13
  - debugging
 
14
  ---
15
 
16
- # DataEngEnv β€” ML Data Pipeline Debugger
17
 
18
  ![OpenEnv](https://img.shields.io/badge/OpenEnv-Compliant-blue)
19
  ![Docker](https://img.shields.io/badge/Docker-Ready-success)
20
  ![HF Spaces](https://img.shields.io/badge/HuggingFace-Spaces-yellow)
 
 
21
 
22
  > *It's 2 AM. The model ships to production in 6 hours. The pipeline is broken.*
23
  > *Can your AI agent fix it in time?*
24
 
25
  ---
26
 
27
- ## What is DataEngEnv?
28
 
29
- DataEngEnv is a real-world OpenEnv environment where an AI agent plays the role of a **frantic Data Engineer debugging a broken ML pipeline before a model goes to production.**
 
 
 
 
 
30
 
31
- Every data team has been here: a schema change breaks the feature script, dirty data crashes the scaler, or a subtle data leakage bug silently inflates model accuracy to 98% β€” and nobody notices until it's too late.
 
 
 
 
32
 
33
- DataEngEnv turns these real failure modes into a structured learning environment. Agents must **inspect data, read error logs, patch broken code, and verify fixes** β€” exactly the workflow a human engineer would follow. No games. No toys. Just the debugging tasks that happen every day at every ML company.
34
 
35
- **Why this matters:** Training agents to debug data pipelines has direct real-world value. A capable pipeline-debugging agent could save ML teams hours of manual work on every model release cycle.
 
 
 
 
 
36
 
37
  ---
38
 
39
- ## Environment Overview
40
 
41
- The agent receives a **broken Python ML pipeline** and must fix it before running out of steps (max 20). At each step the agent chooses one action, receives an observation, and earns a partial reward for meaningful progress.
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
43
- ### Observation Space
44
 
45
- | Field | Type | Description |
46
- |---|---|---|
47
- | `task_id` | `int` | Which task is currently running (1, 2, or 3) |
48
- | `step_number` | `int` | Current step (max 20) |
49
- | `script_content` | `str` | The current state of the pipeline script |
50
- | `last_run_output` | `str` | stdout from the last `run_script` action |
51
- | `last_run_error` | `str \| null` | stderr / exception if the script crashed |
52
- | `data_preview` | `str` | DataFrame shape, columns, nulls, sample rows, stats |
53
- | `schema_info` | `dict` | Column names, dtypes, null counts |
54
- | `done` | `bool` | True when submitted or steps exhausted |
55
 
56
- ### Action Space
57
 
58
- | Action | Payload | What it does |
59
- |---|---|---|
60
- | `inspect_data` | `{}` | Reveals full dataset preview β€” columns, nulls, outliers, sample rows |
61
- | `check_schema` | `{}` | Compares expected vs actual column names |
62
- | `run_script` | `{}` | Executes current script in a 10s sandboxed subprocess |
63
- | `edit_script` | `{"old": str, "new": str}` | Patches the script with a string replacement |
64
- | `submit` | `{}` | Submits the fix to the grader β€” ends the episode |
65
 
66
- ---
 
 
67
 
68
- ## The 3 Tasks
69
 
70
- ### Task 1 β€” Column Rename Bug 🟒 Easy
71
 
72
- **The scenario:** A source CSV was updated and the column `age_years` was renamed to `age`. The pipeline script still references `age_years` and crashes instantly with a `KeyError`.
73
 
74
- **What the agent must do:** Read the error log, inspect the data schema, identify the column mismatch, patch the one broken line.
75
 
76
- **Why it's easy:** The fix is surgical β€” one string replacement. A capable agent should solve this in 3–5 steps.
77
 
78
- **Grader:** Did the script run without error and print an accuracy value?
79
 
80
  ---
81
 
82
- ### Task 2 β€” Dirty Data 🟑 Medium
83
 
84
- **The scenario:** The training dataset has ~15% NaN values across 3 columns AND extreme salary outliers (`9,999,999.0`). The `StandardScaler` crashes with `ValueError: Input contains NaN` before training even starts.
85
 
86
- **What the agent must do:** Detect the nulls and outliers via `inspect_data`, write cleaning logic (`dropna`/`fillna` for NaNs, `clip`/`quantile` for outliers), and get the training script to complete successfully.
 
 
 
 
 
 
87
 
88
- **Why it's medium:** There's no single-line fix. The agent must reason about the data, choose a cleaning strategy, and implement it correctly.
89
 
90
- **Grader:** Did training complete without crashing and print an accuracy score?
91
 
92
- ---
 
 
 
 
 
 
93
 
94
- ### Task 3 β€” Data Leakage πŸ”΄ Hard
95
 
96
- **The scenario:** The pipeline runs perfectly. No errors. It prints `Accuracy: 0.98`. But the model is cheating β€” `StandardScaler.fit_transform()` was called on the **entire dataset** before `train_test_split()`. The scaler has seen the test data. The 0.98 accuracy is a lie.
97
 
98
- **What the agent must do:** Notice that suspiciously high accuracy, diagnose the data leakage (scaler fit before split), fix the pipeline so the scaler only sees training data, and achieve β‰₯ 0.75 accuracy on a **server-side held-out test set** the agent never sees.
 
 
 
 
 
 
 
 
 
99
 
100
- **Why it's hard:** There's no error message. No crash. The agent must reason about *correctness*, not just syntax. This is the hardest class of ML bug to catch.
101
 
102
- **Grader:** Does the fixed script move `scaler.fit()` after `train_test_split()`? Does it achieve β‰₯ 0.75 accuracy on the held-out set?
 
 
 
 
 
 
 
103
 
104
  ---
105
 
@@ -107,42 +152,46 @@ The agent receives a **broken Python ML pipeline** and must fix it before runnin
107
 
108
  DataEngEnv provides **partial credit throughout the episode** β€” not just a binary win/lose at the end.
109
 
110
- | Task | Action | Reward |
111
  |---|---|---|
112
- | Task 1 | First `inspect_data` or `check_schema` | +0.1 |
113
- | Task 1 | `edit_script` removes `age_years` | +0.3 |
114
- | Task 1 | `run_script` with no error | +0.2 |
115
- | Task 2 | `inspect_data` reveals null counts | +0.15 |
116
- | Task 2 | `inspect_data` reveals outliers | +0.15 |
117
- | Task 2 | `edit_script` adds `dropna`/`fillna` | +0.3 |
118
- | Task 2 | `edit_script` adds `clip`/`quantile` | +0.2 |
119
- | Task 3 | Any `inspect_data` action | +0.1 |
120
- | Task 3 | `run_script` (sees suspicious accuracy) | +0.2 |
121
- | Task 3 | `edit_script` moves `fit` after `split` | +0.3 |
122
  | All | `submit` with correct fix | **grader score** |
123
- | Task 3 | `submit` without editing anything | -0.2 |
124
 
125
- Rewards are cumulative and capped at 1.0 before the terminal step.
126
- The terminal reward is always the grader score (0.0–1.0).
127
 
128
  ---
129
 
130
- ## Baseline Scores
131
 
132
- *Evaluated using `llama-3.1-8b-instant` via Groq API*
133
 
134
- | Task | Difficulty | Score | Steps |
135
- |------|-----------|-------|-------|
136
- | Task 1 β€” Column Rename Bug | 🟒 Easy | **1.00** | 3 |
137
- | Task 2 β€” Dirty Data | 🟑 Medium | **1.00** | 15 |
138
- | Task 3 β€” Data Leakage | πŸ”΄ Hard | **1.00** | 15 |
139
- | **Average** | β€” | **1.00** | β€” |
140
 
141
- ---
 
 
142
 
143
- ## Setup & Usage
 
 
 
 
 
 
 
 
 
144
 
145
- ### Run locally
146
  ```bash
147
  git clone https://huggingface.co/spaces/CoBeDigger/DataEngEnv
148
  cd DataEngEnv
@@ -151,78 +200,85 @@ uvicorn app.main:app --host 0.0.0.0 --port 8000
151
  ```
152
 
153
  ### Run with Docker
 
154
  ```bash
155
  docker build -t dataengenv .
156
  docker run -p 7860:7860 dataengenv
157
  ```
158
 
159
- ### Environment variables
160
- ```bash
161
- OPENAI_API_KEY=your_key # for baseline script (OpenAI)
162
- GROQ_API_KEY=your_key # for baseline script (Groq alternative)
163
- DATAENGENV_URL=http://localhost:8000 # baseline target URL
164
- ```
165
 
166
- ---
 
167
 
168
- ## API Reference
169
- ```bash
170
- # Health check
171
- curl https://cobedigger-dataengenv.hf.space/health
172
-
173
- # List all tasks
174
- curl https://cobedigger-dataengenv.hf.space/tasks
175
-
176
- # Start an episode
177
- curl -X POST https://cobedigger-dataengenv.hf.space/reset \
178
- -H "Content-Type: application/json" -d '{"task_id": 1}'
179
-
180
- # Take a step
181
- curl -X POST https://cobedigger-dataengenv.hf.space/step \
182
- -H "Content-Type: application/json" \
183
- -d '{"action_type": "inspect_data", "payload": {}}'
184
 
185
- # Get current state
186
- curl https://cobedigger-dataengenv.hf.space/state
187
 
188
- # Grade current episode
189
- curl -X POST https://cobedigger-dataengenv.hf.space/grader \
190
- -H "Content-Type: application/json" -d '{"task_id": 1}'
 
 
 
 
 
 
191
 
192
- # Run full baseline
193
- curl https://cobedigger-dataengenv.hf.space/baseline
 
194
  ```
195
 
196
  ---
197
 
198
  ## Project Structure
 
199
  ```
200
- dataengenv/
201
  β”œβ”€β”€ app/
202
  β”‚ β”œβ”€β”€ main.py ← FastAPI app, all endpoints
203
  β”‚ β”œβ”€β”€ models.py ← Pydantic v2 typed models
204
  β”‚ β”œβ”€β”€ environment.py ← Core env: reset(), step(), state()
205
  β”‚ β”œβ”€β”€ reward.py ← Partial reward shaping engine
206
  β”‚ β”œβ”€β”€ tasks/
207
- β”‚ β”‚ β”œβ”€β”€ task1_easy.py οΏ½οΏ½οΏ½ Column rename scenario
208
- β”‚ β”‚ β”œβ”€β”€ task2_medium.py ← Dirty data scenario
209
- β”‚ β”‚ └── task3_hard.py ← Data leakage scenario
210
- β”‚ └── graders/
211
- β”‚ β”œβ”€β”€ grader1.py ← Easy task grader
212
- β”‚ β”œβ”€β”€ grader2.py ← Medium task grader
213
- β”‚ └── grader3.py ← Hard task grader
 
 
 
 
 
214
  β”œβ”€β”€ baseline/
215
- β”‚ └── run_baseline.py ← LLM agent inference script
216
- β”œβ”€β”€ openenv.yaml ← OpenEnv spec metadata
217
- β”œβ”€β”€ Dockerfile ← HF Spaces deployment
 
 
218
  └── requirements.txt
219
  ```
220
 
221
  ---
222
 
 
 
 
 
 
 
 
 
 
223
  ## Built By
224
 
225
  **CobeDivers β€” Jey Pranav, Kavin Krish, Hari**
226
- Meta AI Γ— Hugging Face OpenEnv Hackathon
227
 
228
- *Live environment: https://huggingface.co/spaces/CoBeDigger/DataEngEnv*
 
 
 
11
  - ml
12
  - data-engineering
13
  - debugging
14
+ - reinforcement-learning
15
  ---
16
 
17
+ # πŸ”§ PipelineOps Arena β€” ML Data Pipeline Debugger
18
 
19
  ![OpenEnv](https://img.shields.io/badge/OpenEnv-Compliant-blue)
20
  ![Docker](https://img.shields.io/badge/Docker-Ready-success)
21
  ![HF Spaces](https://img.shields.io/badge/HuggingFace-Spaces-yellow)
22
+ ![Stages](https://img.shields.io/badge/Stages-4-purple)
23
+ ![Baseline Score](https://img.shields.io/badge/Baseline-1.00-brightgreen)
24
 
25
  > *It's 2 AM. The model ships to production in 6 hours. The pipeline is broken.*
26
  > *Can your AI agent fix it in time?*
27
 
28
  ---
29
 
30
+ ## πŸ“¦ Submission Links
31
 
32
+ | Resource | Link |
33
+ |---|---|
34
+ | 🌐 **Live Environment** | [https://huggingface.co/spaces/CoBeDigger/DataEngEnv](https://huggingface.co/spaces/CoBeDigger/DataEngEnv) |
35
+ | πŸ€– **Trained Model** | [CoBeDigger/pipelineops-arena-llama3-grpo](https://huggingface.co/CoBeDigger/pipelineops-arena-llama3-grpo) |
36
+ | πŸ“ˆ **Reward Curve** | [View on Model Repo](https://huggingface.co/CoBeDigger/pipelineops-arena-llama3-grpo/blob/main/reward_curve.png) |
37
+ | πŸ““ **Training Notebook** | *(Kaggle notebook link)* |
38
 
39
+ ---
40
+
41
+ ## What is PipelineOps Arena?
42
+
43
+ PipelineOps Arena is a **4-stage cascading OpenEnv environment** where an AI agent plays the role of a **frantic Data Engineer debugging a broken ML pipeline before a model goes to production.**
44
 
45
+ Unlike simple game environments, this tests real-world engineering skills: schema debugging, feature scaling, data leakage detection, and fairness auditing β€” the exact workflow a human ML engineer follows every day.
46
 
47
+ ### Why This Environment Is Different
48
+
49
+ - **4-stage cascade**: Each stage must be solved to unlock the next
50
+ - **Loop mechanic**: Failing Stage 4 sends the agent back to Stage 1 with a penalty β€” forcing genuine long-horizon planning
51
+ - **Actor bots**: Stage 4 includes a simulated MLOps reviewer that provides fairness feedback
52
+ - **Deterministic grading**: Every reward comes from objective, code-based evaluation β€” not LLM-as-judge
53
 
54
  ---
55
 
56
+ ## πŸ—οΈ The 4-Stage Pipeline
57
 
58
+ ```
59
+ Stage 1 Stage 2 Stage 3 Stage 4
60
+ Data Repair β†’ Training Fix β†’ Eval Fix β†’ Deploy Gate
61
+ (Schema Bug) (Divergence) (Leakage) (Fairness)
62
+ 🟒 Easy 🟑 Medium πŸ”΄ Hard πŸ”΄ Hard
63
+ β”‚ β”‚ β”‚ β”‚
64
+ └─── Fix β”€β”€β”€β”€β”€β”€β”€β”˜β”€β”€β”€ Fix β”€β”€β”€β”€β”€β”€β”€β”˜β”€β”€β”€ Fix β”€β”€β”€β”€β”€β”€β”€β”˜
65
+ β”‚
66
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”˜
67
+ β”‚ FAIL?
68
+ β–Ό
69
+ Back to Stage 1
70
+ (with penalty)
71
+ ```
72
 
73
+ ### Stage 1 β€” Data Repair 🟒
74
 
75
+ **Bug:** Column `age_years` was renamed to `age` in source data. Script crashes with `KeyError`. Also has ~15% NaN values.
 
 
 
 
 
 
 
 
 
76
 
77
+ **Fix:** Rename column reference + `dropna()`
78
 
79
+ ### Stage 2 β€” Training Monitor 🟑
 
 
 
 
 
 
80
 
81
+ **Bug:** `MLPClassifier` trains on unscaled features β†’ loss diverges, model fails to converge.
82
+
83
+ **Fix:** Add `StandardScaler` before the classifier.
84
 
85
+ ### Stage 3 β€” Eval Validation πŸ”΄
86
 
87
+ **Bug:** `scaler.fit_transform()` runs on the **entire dataset before** `train_test_split()`. The test set has seen training statistics. 98% accuracy is a lie.
88
 
89
+ **Fix:** Move `scaler.fit()` to after the split β€” fit only on training data.
90
 
91
+ ### Stage 4 β€” Deploy Gate πŸ”΄
92
 
93
+ **Bug:** Model passes accuracy checks but has demographic bias. The MLOps bot rejects deployment.
94
 
95
+ **Fix:** Add `class_weight='balanced'` to `LogisticRegression` to ensure fairness across groups.
96
 
97
  ---
98
 
99
+ ## πŸ“Š Training Results
100
 
101
+ We fine-tuned **LLaMA 3.1 8B** using SFT warmup followed by GRPO (Group Relative Policy Optimization) via HuggingFace TRL.
102
 
103
+ | Metric | Value |
104
+ |---|---|
105
+ | First 10 episodes avg | **0.15** |
106
+ | Last 10 episodes avg | **0.52** |
107
+ | Improvement | **+0.37** |
108
+ | Peak score | **1.00** |
109
+ | Total episodes | 30 |
110
 
111
+ The reward curve shows a clear upward learning trend β€” the agent progresses from random exploration (near-zero reward) to consistently completing multiple pipeline stages.
112
 
113
+ ### Baseline Agent Performance
114
 
115
+ | Stage | Task | Score | Steps |
116
+ |---|---|---|---|
117
+ | Stage 1 | Data Repair | **1.00** | 4 |
118
+ | Stage 2 | Training Monitor | **1.00** | 4 |
119
+ | Stage 3 | Eval Validation | **1.00** | 4 |
120
+ | Stage 4 | Deploy Gate | **1.00** | 6 |
121
+ | **Total** | **All 4 Stages** | **1.00** | **18** |
122
 
123
+ ---
124
 
125
+ ## Observation Space
126
 
127
+ | Field | Type | Description |
128
+ |---|---|---|
129
+ | `current_stage` | `int` | Current pipeline stage (1-4) |
130
+ | `step_number` | `int` | Current step (max 20) |
131
+ | `script_content` | `str` | The current state of the pipeline script |
132
+ | `last_run_output` | `str` | stdout from the last `run_script` action |
133
+ | `last_run_error` | `str \| null` | stderr / exception if the script crashed |
134
+ | `data_preview` | `str` | DataFrame shape, columns, nulls, sample rows |
135
+ | `schema_info` | `dict` | Column names, dtypes, null counts |
136
+ | `done` | `bool` | True when all stages complete or steps exhausted |
137
 
138
+ ## Action Space
139
 
140
+ | Action | Payload | What it does |
141
+ |---|---|---|
142
+ | `inspect_data` | `{}` | Reveals full dataset preview β€” columns, nulls, outliers |
143
+ | `check_schema` | `{}` | Compares expected vs actual column names |
144
+ | `run_script` | `{}` | Executes current script in a 10s sandboxed subprocess |
145
+ | `edit_script` | `{"old": str, "new": str}` | Patches the script with a string replacement |
146
+ | `query_actor` | `{}` | Consult the MLOps bot for deployment feedback |
147
+ | `submit` | `{}` | Submits the fix to the grader β€” advances to next stage |
148
 
149
  ---
150
 
 
152
 
153
  DataEngEnv provides **partial credit throughout the episode** β€” not just a binary win/lose at the end.
154
 
155
+ | Stage | Action | Reward |
156
  |---|---|---|
157
+ | Stage 1 | First `inspect_data` or `check_schema` | +0.1 |
158
+ | Stage 1 | `edit_script` fixes column name | +0.3 |
159
+ | Stage 1 | `run_script` with no error | +0.2 |
160
+ | Stage 2 | `inspect_data` reveals divergence | +0.15 |
161
+ | Stage 2 | `edit_script` adds StandardScaler | +0.3 |
162
+ | Stage 3 | `run_script` (sees suspicious accuracy) | +0.2 |
163
+ | Stage 3 | `edit_script` moves fit after split | +0.3 |
164
+ | Stage 4 | `query_actor` gets fairness feedback | +0.1 |
165
+ | Stage 4 | `edit_script` adds class_weight balanced | +0.3 |
 
166
  | All | `submit` with correct fix | **grader score** |
 
167
 
168
+ Rewards are cumulative and capped at 1.0 per stage. The terminal reward is the grader score (0.0–1.0).
 
169
 
170
  ---
171
 
172
+ ## πŸš€ Quick Start
173
 
174
+ ### Use the Live API
175
 
176
+ ```bash
177
+ # Health check
178
+ curl https://cobedigger-dataengenv.hf.space/health
 
 
 
179
 
180
+ # Reset environment (start fresh episode)
181
+ curl -X POST https://cobedigger-dataengenv.hf.space/reset \
182
+ -H "Content-Type: application/json" -d '{}'
183
 
184
+ # Take an action
185
+ curl -X POST https://cobedigger-dataengenv.hf.space/step \
186
+ -H "Content-Type: application/json" \
187
+ -d '{"action_type": "inspect_data", "payload": {}}'
188
+
189
+ # Check pipeline progress
190
+ curl https://cobedigger-dataengenv.hf.space/pipeline_status
191
+ ```
192
+
193
+ ### Run Locally
194
 
 
195
  ```bash
196
  git clone https://huggingface.co/spaces/CoBeDigger/DataEngEnv
197
  cd DataEngEnv
 
200
  ```
201
 
202
  ### Run with Docker
203
+
204
  ```bash
205
  docker build -t dataengenv .
206
  docker run -p 7860:7860 dataengenv
207
  ```
208
 
209
+ ### Train Your Own Agent
 
 
 
 
 
210
 
211
+ ```python
212
+ import requests
213
 
214
+ ENV_URL = "https://cobedigger-dataengenv.hf.space"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
 
216
+ # Reset
217
+ obs = requests.post(f"{ENV_URL}/reset").json()
218
 
219
+ # Agent loop
220
+ for step in range(20):
221
+ action = your_agent.decide(obs)
222
+ result = requests.post(f"{ENV_URL}/step", json=action).json()
223
+ obs = result["observation"]
224
+ reward = result["reward"]
225
+
226
+ if obs["done"]:
227
+ break
228
 
229
+ # Check final score
230
+ status = requests.get(f"{ENV_URL}/pipeline_status").json()
231
+ print(f"Score: {status['episode_score']}")
232
  ```
233
 
234
  ---
235
 
236
  ## Project Structure
237
+
238
  ```
239
+ PipelineOps-Arena/
240
  β”œβ”€β”€ app/
241
  β”‚ β”œβ”€β”€ main.py ← FastAPI app, all endpoints
242
  β”‚ β”œβ”€β”€ models.py ← Pydantic v2 typed models
243
  β”‚ β”œβ”€β”€ environment.py ← Core env: reset(), step(), state()
244
  β”‚ β”œβ”€β”€ reward.py ← Partial reward shaping engine
245
  β”‚ β”œβ”€β”€ tasks/
246
+ β”‚ β”‚ β”œβ”€β”€ stage1_data_repair.py ← Column rename + NaN scenario
247
+ β”‚ β”‚ β”œβ”€β”€ stage2_training_monitor.py ← Feature scaling scenario
248
+ β”‚ β”‚ β”œβ”€β”€ stage3_eval_validation.py ← Data leakage scenario
249
+ β”‚ β”‚ └── stage4_deploy_gate.py ← Fairness gate scenario
250
+ β”‚ β”œβ”€β”€ graders/
251
+ β”‚ β”‚ β”œβ”€β”€ grader_stage1.py ← Schema fix grader
252
+ β”‚ β”‚ β”œβ”€β”€ grader_stage2.py ← Training convergence grader
253
+ β”‚ β”‚ β”œβ”€β”€ grader_stage3.py ← Leakage detection grader
254
+ β”‚ β”‚ └── grader_stage4.py ← Fairness threshold grader
255
+ β”‚ └── actors/
256
+ β”‚ β”œβ”€β”€ mlops_bot.py ← Simulated MLOps reviewer
257
+ β”‚ └── code_reviewer.py ← Code review actor
258
  β”œβ”€β”€ baseline/
259
+ β”‚ └── run_baseline.py ← Expert baseline agent
260
+ β”œβ”€β”€ gradio_app.py ← Premium Gradio dashboard UI
261
+ β”œβ”€β”€ openenv.yaml ← OpenEnv spec metadata
262
+ β”œβ”€β”€ Dockerfile ← HF Spaces deployment
263
+ β”œβ”€β”€ pyproject.toml ← Package configuration
264
  └── requirements.txt
265
  ```
266
 
267
  ---
268
 
269
+ ## Environment Variables
270
+
271
+ ```bash
272
+ OPENAI_API_KEY=your_key # for actor bots (optional)
273
+ GROQ_API_KEY=your_key # for baseline script (optional)
274
+ ```
275
+
276
+ ---
277
+
278
  ## Built By
279
 
280
  **CobeDivers β€” Jey Pranav, Kavin Krish, Hari**
 
281
 
282
+ Meta AI Γ— Hugging Face OpenEnv Hackathon 2026
283
+
284
+ *Live environment: [https://huggingface.co/spaces/CoBeDigger/DataEngEnv](https://huggingface.co/spaces/CoBeDigger/DataEngEnv)*
openenv.yaml CHANGED
@@ -1,20 +1,21 @@
1
  name: DataEngEnv
2
- version: "1.0.0"
3
- description: "ML Data Pipeline Debugger β€” AI agent fixes broken ML pipelines before production"
4
- tags: [openenv, data-engineering, machine-learning, debugging, real-world]
5
  tasks:
6
- - {id: 1, name: column_rename_bug, difficulty: easy}
7
- - {id: 2, name: dirty_data, difficulty: medium}
8
- - {id: 3, name: data_leakage, difficulty: hard}
 
9
  endpoints:
10
  reset: POST /reset
11
  step: POST /step
12
  state: GET /state
13
  tasks: GET /tasks
14
  grader: POST /grader
15
- baseline: GET /baseline
16
  observation_space:
17
- task_id: int
18
  step_number: int
19
  script_content: str
20
  last_run_output: str
@@ -27,6 +28,9 @@ action_space:
27
  - {type: check_schema, payload: {}}
28
  - {type: run_script, payload: {}}
29
  - {type: edit_script, payload: {old: str, new: str}}
 
30
  - {type: submit, payload: {}}
31
  reward_range: [0.0, 1.0]
32
  max_steps: 20
 
 
 
1
  name: DataEngEnv
2
+ version: "2.0.0"
3
+ description: "PipelineOps Arena β€” 4-stage cascading ML pipeline debugger with fairness gate"
4
+ tags: [openenv, data-engineering, machine-learning, debugging, reinforcement-learning, fairness]
5
  tasks:
6
+ - {id: 1, name: data_repair, difficulty: easy, description: "Fix column rename bug + NaN handling"}
7
+ - {id: 2, name: training_monitor, difficulty: medium, description: "Add StandardScaler for MLP convergence"}
8
+ - {id: 3, name: eval_validation, difficulty: hard, description: "Fix data leakage β€” scaler after split"}
9
+ - {id: 4, name: deploy_gate, difficulty: hard, description: "Fix model fairness with class_weight balanced"}
10
  endpoints:
11
  reset: POST /reset
12
  step: POST /step
13
  state: GET /state
14
  tasks: GET /tasks
15
  grader: POST /grader
16
+ pipeline_status: GET /pipeline_status
17
  observation_space:
18
+ current_stage: int
19
  step_number: int
20
  script_content: str
21
  last_run_output: str
 
28
  - {type: check_schema, payload: {}}
29
  - {type: run_script, payload: {}}
30
  - {type: edit_script, payload: {old: str, new: str}}
31
+ - {type: query_actor, payload: {}}
32
  - {type: submit, payload: {}}
33
  reward_range: [0.0, 1.0]
34
  max_steps: 20
35
+ cascade: true
36
+ loop_on_failure: true