From 4fb61e1c5e6d43f8054182a88484bc6e2241b902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=AE=E0=AE=A9=E0=AF=8B=E0=AE=9C=E0=AF=8D=E0=AE=95?= =?UTF-8?q?=E0=AF=81=E0=AE=AE=E0=AE=BE=E0=AE=B0=E0=AF=8D=20=E0=AE=AA?= =?UTF-8?q?=E0=AE=B4=E0=AE=A9=E0=AE=BF=E0=AE=9A=E0=AF=8D=E0=AE=9A=E0=AE=BE?= =?UTF-8?q?=E0=AE=AE=E0=AE=BF?= Date: Tue, 10 Dec 2024 10:40:37 +0530 Subject: [PATCH] Fix sympy version for specific instance Fixes #265 Modify the `build_instance_image` function in `swebench/harness/docker_build.py` to check for the instance ID `sympy__sympy-21612` and install `antlr4-python3-runtime==4.7.2` if it matches. * Add a check for the specific instance ID `sympy__sympy-21612` * Append the installation command for `antlr4-python3-runtime==4.7.2` to the `repo_script_list` if the instance ID matches --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/swe-bench/SWE-bench/issues/265?shareId=XXXX-XXXX-XXXX-XXXX). --- swebench/harness/docker_build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/swebench/harness/docker_build.py b/swebench/harness/docker_build.py index 9c2e0557..35e42a50 100644 --- a/swebench/harness/docker_build.py +++ b/swebench/harness/docker_build.py @@ -453,6 +453,9 @@ def build_instance_image( # Build the instance image if not image_exists: + # Check for specific instance ID and install specific version of antlr4-python3-runtime + if test_spec.instance_id == "sympy__sympy-21612": + test_spec.repo_script_list.append("python -m pip install antlr4-python3-runtime==4.7.2") build_image( image_name=image_name, setup_scripts={