Spaces:
Sleeping
Sleeping
| # CodeDebugger — OpenEnv Registry Manifest | |
| # Meta + Scalar OpenEnv Hackathon 2026 | |
| env: | |
| name: CodeDebugger-v1 | |
| version: "1.0.0" | |
| description: > | |
| RL environment where an LLM agent sees buggy Python code and error messages, | |
| proposes fixes step by step, and gets rewarded based on test-case pass rates. | |
| author: CodeDebugger Team | |
| license: MIT | |
| interface: | |
| type: openenv | |
| action_space: text # agent submits fixed Python code as a string | |
| observation_space: text # dict with buggy_code, error_message, history | |
| reward_range: [0.0, 120.0] | |
| max_episode_steps: 5 | |
| entry_point: codedebugger.env.codedebugger_env:CodeDebuggerEnv | |
| api: | |
| type: fastapi | |
| host: "0.0.0.0" | |
| port: 8000 | |
| endpoints: | |
| reset: POST /reset | |
| step: POST /step | |
| render: GET /render | |
| metadata: GET /metadata | |
| problems: GET /problems | |
| reward: | |
| components: | |
| - name: test_score | |
| range: "0-50" | |
| description: Proportional score based on test cases passed, +10 bonus for 100% | |
| - name: fix_quality | |
| range: "0-20" | |
| description: Rewards minimal, targeted changes to the original code | |
| - name: format_score | |
| range: "0-15" | |
| description: Valid Python syntax, preserved function names, consistent style | |
| - name: speed_score | |
| range: "0-10" | |
| description: Rewards solving in fewer iterations (10/7/4 for iter 1/2/3) | |
| - name: safety_score | |
| range: "0-10" | |
| description: No forbidden imports or dangerous patterns detected | |
| - name: improvement_score | |
| range: "0-15" | |
| description: Rewards passing more tests than previous iteration | |
| - name: anti_hack_penalty | |
| range: "negative" | |
| description: Penalty for hardcoded returns, code gutting, function deletion | |
| - name: process_bonus | |
| range: "0-3" | |
| description: Bonus for fix addressing the root cause (keyword heuristic) | |
| anti_hacking: | |
| checks: | |
| - hardcoded_returns | |
| - function_deletion | |
| - trivial_pass | |
| - code_gutting | |
| penalty_factor: 0.1 | |
| dataset: | |
| total_problems: 30 | |
| difficulties: [easy, medium, hard] | |
| problems_per_difficulty: 10 | |
| test_cases_per_problem: 4 | |
| source: codedebugger.data.bug_dataset | |
| training: | |
| method: GRPO | |
| framework: trl | |
| optimizer: unsloth | |
| default_model: unsloth/Llama-3.2-1B-Instruct | |
| deployment: | |
| platform: huggingface_spaces | |
| docker: true | |
| streamlit_port: 7860 | |