Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to build scikit-learn env image since this weekend. #321

Open
peniparker24 opened this issue Feb 12, 2025 · 2 comments
Open

Failing to build scikit-learn env image since this weekend. #321

peniparker24 opened this issue Feb 12, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@peniparker24
Copy link

Describe the bug

Hey, thanks again for such an awesome package! I've been using it a lot to test my swebench experiments, but this weekend I tried to set up a new machine and ran into a puzzling bug, all env images build except one, which I've traced back to scikit-learn.

However, I am a bit confused, a recent update has changed things such that the package now pulls from dockerhub instead of building instance_id images from env images: #311 (comment) Given that, is this error safe to ignore if caching instance_id images? And if it is, could we skip building them entirely, does the env image still add value anywhere? I ask because packages like Agentless will rerun run_instance many, many times, and each time it will try and fail to build this image, so I want to get ahead of seeing this failure in my logs on a regular basis if possible!

Steps/Code to Reproduce

Start on a clean machine, run :

python -m swebench.harness.run_evaluation \
    --dataset_name princeton-nlp/SWE-Bench_verified \ 
    --predictions_path gold \
    --max_workers 8 \
    --cache_level instance \ 
    --run_id validate-gold

Eventually this will output something like:

Traceback (most recent call last):
   File "/local/home/user/.venv/lib/python3.11/site-packages/swebench/harness/utils.py", line 92, in run_threadpool
     future.result()
   File "/home/user/.local/share/mise/installs/python/3.11/lib/python3.11/concurrent/futures/_base.py", line 449, in result
     return self.get_result()
            ^^^^^^^^^^^^^^^^^^^
   File "/home/user/.local/share/mise/installs/python/3.11/lib/python3.11/concurrent/futures/_base.py", line 401, in get_result
     raise self._exception
   File "/home/user/.local/share/mise/installs/python/3.11/lib/python3.11/concurrent/futures/thread.py", line 58, in run
     result = self.fn(*self.args, **self.kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/local/home/user/.venv/lib/python3.11/site-packages/swebench/harness/docker_build.py", line 161, in build_image
     raise BuildImageError(image_name, str(e), logger) from e
 swebench.harness.docker_build.BuildImageError: Error building image sweb.env.py.x86_64.3a59860bcd0dab8bbfb2ff:latest: The command '/bin/sh -c /bin/bash -c "source ~/.bashrc && /root/setup_env.sh"' returned a non-zero code: 1

when looking into logs, it traces the error back to an unbound variable Qt:

2025-02-10 13:49:54,284 - INFO - /opt/miniconda3/envs/testbed/etc/conda/activate.d/qt-main_activate.sh: line 5: QT_XCB_GL_INTEGRATION: unbound variable
2025-02-10 13:50:00,430 - INFO - ---> Removed intermediate container d4c9437c8c53
2025-02-10 13:50:00,430 - ERROR - Error: The command '/bin/sh -c /bin/bash -c "source ~/.bashrc && /root/setup_env.sh"' returned a non-zero code: 1

Expected Results

No error is thrown.

Actual Results

an error when building one env image, which I'm not sure I still need if I'm caching instance_id images.

System Information

ubuntu 22.04

@peniparker24 peniparker24 added the bug Something isn't working label Feb 12, 2025
@lycfight
Copy link

I also encountered the same issue; the sweb.env.x86_64.3a59860bcd0dab8bbfb2ff:latest image has been failing to build successfully.

@TGMM24
Copy link

TGMM24 commented Feb 17, 2025

I also encountered the same issue.
BuildImageError sweb.env.x86_64.3a59860bcd0dab8bbfb2ff:latest
Traceback (most recent call last):
File "/home/amax/anaconda3/envs/agentless/lib/python3.11/site-packages/swebench/harness/docker_build.py", line 147, in build_image
raise docker.errors.BuildError(
docker.errors.BuildError: The command '/bin/sh -c /bin/bash -c "source ~/.bashrc && /root/setup_env.sh"' returned a non-zero code: 1

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/amax/anaconda3/envs/agentless/lib/python3.11/site-packages/swebench/harness/docker_build.py", line 308, in build_env_images
future.result()
File "/home/amax/anaconda3/envs/agentless/lib/python3.11/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/amax/anaconda3/envs/agentless/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/amax/anaconda3/envs/agentless/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/amax/anaconda3/envs/agentless/lib/python3.11/site-packages/swebench/harness/docker_build.py", line 153, in build_image
raise BuildImageError(image_name, str(e), logger) from e
swebench.harness.docker_build.BuildImageError: Error building image sweb.env.x86_64.3a59860bcd0dab8bbfb2ff:latest: The command '/bin/sh -c /bin/bash -c "source ~/.bashrc && /root/setup_env.sh"' returned a non-zero code: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants