Spaces:
Sleeping
Sleeping
| """ | |
| Code Debug Environment Models | |
| ------------------------------ | |
| Action, Observation, and State types for the Code Debug environment. | |
| """ | |
| from __future__ import annotations | |
| from openenv.core.env_server.interfaces import Action, Observation, State | |
| class DebugAction(Action): | |
| """Agent submits corrected Python code.""" | |
| code: str | |
| class DebugObservation(Observation): | |
| """Result of grading the agent's code against the test suite.""" | |
| task_name: str = "" | |
| buggy_code: str = "" | |
| task_description: str = "" | |
| current_code: str = "" | |
| test_results: str = "" | |
| tests_passed: int = 0 | |
| tests_total: int = 0 | |
| stderr: str = "" | |
| class DebugState(State): | |
| """Tracks episode progress for the debugging task.""" | |
| current_task: str = "" | |
| best_tests_passed: int = 0 | |
| tests_total: int = 0 | |