SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Fix pypi package installation command
John Yangc17dcffa5712
diff --git a/sweagent/environment/swe_env.py b/sweagent/environment/swe_env.pyindex ad780678..62a532cd 100644--- a/sweagent/environment/swe_env.py+++ b/sweagent/environment/swe_env.py@@ -719,7 +719,7 @@ class SWEEnv(gym.Env):# Install extra pip packages if specifiedif "pip_packages" in install_configs:self.communicate_with_handling(- f"source activate {env_name} && pip install {install_configs['pip_packages']}",+ f"source activate {env_name} && pip install {' '.join(install_configs['pip_packages'])}",error_msg="Failed to install pip packages",timeout_duration=LONG_TIMEOUT)diff --git a/tests/test_env.py b/tests/test_env.pyindex 1b204260..2d8f6a0a 100644--- a/tests/test_env.py+++ b/tests/test_env.py@@ -59,7 +59,7 @@ def test_execute_environment(tmp_path, test_env_args):test_env = {"python": "3.6","packages": "pytest",- "pip_packages": "tox",+ "pip_packages": ["tox"],"install": "echo 'installing'",}env_config_path = Path(tmp_path / "env_config.yml")