Coding Env improvements for further development #235
+601
−67
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎯 Summary
This PR adds in-repo development support for the coding_env environment and fixes the reward computation bug that prevented the transform pipeline from evaluating code and assigning rewards.
Testing
Runs the environment and prints rewards
Running reward tests before the fix:
After
✨ Features & Enhancements
Added dual-mode import support for both standalone (PyPI) and in-repo development
coding_envwithin the OpenEnv monorepo without publishing to PyPIUpdated Dockerfile for in-repo build mode
BUILD_MODEargument for flexible Docker buildsUpdated package dependencies
pyproject.toml, both for the env and main project, as the docker termination was updated..modelsmoduleEnhanced README with development instructions
Improved container cleanup logic
🐛 Bug Fixes
Reward Computation Fix
python_codeact_env.pymetadata={"last_code": action.code}toCodeObservationinstep()methodCodeSafetyTransformandCodeQualityTransform) to evaluate codemetadata["last_code"]to calculate rewards, but it was never being setNonereward = 0.1reward = 0.0import os,eval(), etc.):reward = -1.0reward = -0.2Test Script Enhancement
local_coding_env.pyexampleresult.rewardfor both successful executions and error scenarios