Skip to content

Comments

bugfix: pip_install_packages="" now doesn't break sandbox#633

Merged
mikasenghaas merged 1 commit intomainfrom
sebastian/python-env/fix-empty-pip_inistall_packages
Dec 14, 2025
Merged

bugfix: pip_install_packages="" now doesn't break sandbox#633
mikasenghaas merged 1 commit intomainfrom
sebastian/python-env/fix-empty-pip_inistall_packages

Conversation

@snimu
Copy link
Contributor

@snimu snimu commented Dec 14, 2025

Description

In vf.PythonEnv, the pip_install_packages argument causes Sandboxes to fail. Due to the error catching, this is only visible in the tool-outputs. The model still continues working (and succeeds in many environments like math-python).

The error is caused by the _START_COMMAND_TEMPLATE having pip install -q {pip_install_packages} in it, which errors when pip_install_packages = "". This is now replaced with {pip_install_command}, which in turn is guaranteed to be empty if there are no packages to install.

Previously, running uv run vf-eval math-python -n 1 -r 1 -m gpt-5-mini -a '{"pip_install_packages": ""}' resulted in outputs like this, which resulted in full reward and a functional rollout, just no usable sandboxes:

image

Now, the sandboxes work (though the models still assume the presence of numpy, scipy, and sympy for math-python; but that's not an issue with the sandboxes):

image

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test improvement

Testing

  • All existing tests pass when running uv run pytest locally.
  • New tests have been added to cover the changes

Checklist

  • My code follows the style guidelines of this project as outlined in AGENTS.md
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes

@mikasenghaas mikasenghaas merged commit ac2b2e9 into main Dec 14, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants