From a8ee3c563d157a5720a6ad3f7f29c5c6898eac74 Mon Sep 17 00:00:00 2001 From: Kilian Lieret Date: Tue, 22 Oct 2024 20:24:02 -0400 Subject: [PATCH] Fix: Use swe-bench workaround for yanked pkgs --- sweagent/environment/swe_env.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sweagent/environment/swe_env.py b/sweagent/environment/swe_env.py index 59e7d4a93..8362c7069 100644 --- a/sweagent/environment/swe_env.py +++ b/sweagent/environment/swe_env.py @@ -22,6 +22,7 @@ from simple_parsing.helpers.serialization.serializable import FrozenSerializable from swebench.harness.constants import MAP_REPO_VERSION_TO_SPECS from swebench.harness.utils import get_environment_yml, get_requirements +from swebench.swebench.harness.test_spec import replace_uninstallable_packages_requirements_txt import docker import docker.errors @@ -1224,7 +1225,7 @@ def install_env(self) -> None: ) self.logger.debug("Created conda environment") # Write reqs to requirements.txt in docker container - content_reqs = get_requirements(self.record) + content_reqs = replace_uninstallable_packages_requirements_txt(get_requirements(self.record)) copy_file_to_container(self.container_obj, content_reqs, PATH_TO_REQS) # Create conda environment + install reqs self.communicate_with_handling(