Spaces:
Sleeping
Sleeping
Commit Β·
efaec4a
1
Parent(s): 1f7d3cf
docs: hackathon-ready README with training evidence and 4-stage cascade
Browse files- README.md +169 -113
- openenv.yaml +12 -8
README.md
CHANGED
|
@@ -11,95 +11,140 @@ tags:
|
|
| 11 |
- ml
|
| 12 |
- data-engineering
|
| 13 |
- debugging
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
-
#
|
| 17 |
|
| 18 |

|
| 19 |

|
| 20 |

|
|
|
|
|
|
|
| 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 |
-
##
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
---
|
| 38 |
|
| 39 |
-
##
|
| 40 |
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
-
###
|
| 44 |
|
| 45 |
-
|
| 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 |
-
|
| 57 |
|
| 58 |
-
|
| 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 |
-
##
|
| 69 |
|
| 70 |
-
|
| 71 |
|
| 72 |
-
**
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
-
**
|
| 77 |
|
| 78 |
-
**
|
| 79 |
|
| 80 |
---
|
| 81 |
|
| 82 |
-
##
|
| 83 |
|
| 84 |
-
**
|
| 85 |
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
-
|
| 89 |
|
| 90 |
-
|
| 91 |
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
|
| 95 |
|
| 96 |
-
|
| 97 |
|
| 98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
|
| 100 |
-
|
| 101 |
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
-
|
|
| 111 |
|---|---|---|
|
| 112 |
-
|
|
| 113 |
-
|
|
| 114 |
-
|
|
| 115 |
-
|
|
| 116 |
-
|
|
| 117 |
-
|
|
| 118 |
-
|
|
| 119 |
-
|
|
| 120 |
-
|
|
| 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
|
| 126 |
-
The terminal reward is always the grader score (0.0β1.0).
|
| 127 |
|
| 128 |
---
|
| 129 |
|
| 130 |
-
##
|
| 131 |
|
| 132 |
-
|
| 133 |
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 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 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
-
###
|
| 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 |
-
|
| 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 |
-
#
|
| 186 |
-
|
| 187 |
|
| 188 |
-
#
|
| 189 |
-
|
| 190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
|
| 192 |
-
#
|
| 193 |
-
|
|
|
|
| 194 |
```
|
| 195 |
|
| 196 |
---
|
| 197 |
|
| 198 |
## Project Structure
|
|
|
|
| 199 |
```
|
| 200 |
-
|
| 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 |
-
β β βββ
|
| 208 |
-
β β βββ
|
| 209 |
-
β β
|
| 210 |
-
β βββ
|
| 211 |
-
β
|
| 212 |
-
β
|
| 213 |
-
β
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
βββ baseline/
|
| 215 |
-
β βββ run_baseline.py
|
| 216 |
-
βββ
|
| 217 |
-
βββ
|
|
|
|
|
|
|
| 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 |
-
|
|
|
|
|
|
|
|
|
| 11 |
- ml
|
| 12 |
- data-engineering
|
| 13 |
- debugging
|
| 14 |
+
- reinforcement-learning
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# π§ PipelineOps Arena β ML Data Pipeline Debugger
|
| 18 |
|
| 19 |

|
| 20 |

|
| 21 |

|
| 22 |
+

|
| 23 |
+

|
| 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: "
|
| 3 |
-
description: "
|
| 4 |
-
tags: [openenv, data-engineering, machine-learning, debugging,
|
| 5 |
tasks:
|
| 6 |
-
- {id: 1, name:
|
| 7 |
-
- {id: 2, name:
|
| 8 |
-
- {id: 3, name:
|
|
|
|
| 9 |
endpoints:
|
| 10 |
reset: POST /reset
|
| 11 |
step: POST /step
|
| 12 |
state: GET /state
|
| 13 |
tasks: GET /tasks
|
| 14 |
grader: POST /grader
|
| 15 |
-
|
| 16 |
observation_space:
|
| 17 |
-
|
| 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
|