princeton-nlp / SWE-bench

[ICLR 2024] SWE-Bench: Can Language Models Resolve Real-world Github Issues?
https://www.swebench.com
MIT License
1.45k stars 240 forks source link

Install failed on instances from astropy__astropy #127

Closed JiyangZhang closed 1 month ago

JiyangZhang commented 1 month ago

Describe the bug

I found instances from astropyastropy repo consistently fail because of environment installation failure. For example `astropyastropy-14182`. I reproduce the bug using the latest version of SWE-agent.

Steps/commands/code to Reproduce

python run.py --model_name bedrock:anthropic.claude-3-haiku-20240307-v1:0 --instance_filter astropy__astropy-14182 --config_file config/configs/xml_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml --split test

Error message/results

INFO     ▶️  Beginning task 101
INFO     astropy__astropy not found in container, cloning...
INFO     astropy__astropy__5.1 conda env not found, creating...
INFO     Installing astropy__astropy at base commit...
ERROR    Install command failed to execute successfully: Obtaining file:///astropy__astropy
           Installing build dependencies: started
           Installing build dependencies: finished with status 'done'
           Checking if build backend supports build_editable: started
           Checking if build backend supports build_editable: finished with status 'done'
           Getting requirements to build editable: started
           Getting requirements to build editable: finished with status 'error'
           error: subprocess-exited-with-error

           × Getting requirements to build editable did not run successfully.
           │ exit code: 1
           ╰─> [27 lines of output]
               Traceback (most recent call last):
                 File "/root/miniconda3/envs/astropy__astropy__5.1/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
                   main()
                 File "/root/miniconda3/envs/astropy__astropy__5.1/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
                   json_out['return_val'] = hook(**hook_input['kwargs'])
                 File "/root/miniconda3/envs/astropy__astropy__5.1/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in
         get_requires_for_build_editable
                   return hook(config_settings)
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 448, in get_requires_for_build_editable
                   return self.get_requires_for_build_wheel(config_settings)
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
                   return self._get_build_requires(config_settings, requirements=['wheel'])
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
                   self.run_setup()
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
                   exec(code, locals())
                 File "<string>", line 69, in <module>
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/extension_helpers/_setup_helpers.py", line 63, in get_extensions
                   for setuppkg in iter_setup_packages(srcdir, packages):
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/extension_helpers/_setup_helpers.py", line 159, in iter_setup_packages
                   module = import_file(setup_package, name=packagename + ".setup_package")
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/extension_helpers/_utils.py", line 136, in import_file
                   loader.exec_module(mod)
                 File "<frozen importlib._bootstrap_external>", line 850, in exec_module
                 File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
                 File "./astropy/wcs/setup_package.py", line 13, in <module>
                   from setuptools.dep_util import newer_group
               ModuleNotFoundError: No module named 'setuptools.dep_util'
               [end of output]

           note: This error originates from a subprocess, and is likely not a problem with pip.
         error: subprocess-exited-with-error

         × Getting requirements to build editable did not run successfully.
         │ exit code: 1
         ╰─> See above for output.

         note: This error originates from a subprocess, and is likely not a problem with pip.

INFO     Beginning environment shutdown...
INFO     Agent container stopped
Traceback (most recent call last):
  File "/home/code/SWE-agent/run.py", line 377, in main
    self.run(index)
  File "/home/code/SWE-agent/run.py", line 341, in run
    observation, info = self.env.reset(index)
  File "/home/SWE-agent/sweagent/environment/swe_env.py", line 316, in reset
    self.install_env()
  File "/home/SWE-agent/sweagent/environment/swe_env.py", line 826, in install_env
    self.communicate_with_handling(
  File "/home/SWE-agent/sweagent/environment/swe_env.py", line 639, in communicate_with_handling
    raise RuntimeError(msg)
RuntimeError: Install command failed to execute successfully: Obtaining file:///astropy__astropy
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Getting requirements to build editable: finished with status 'error'
  error: subprocess-exited-with-error

  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      Traceback (most recent call last):
        File "/root/miniconda3/envs/astropy__astropy__5.1/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/root/miniconda3/envs/astropy__astropy__5.1/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/root/miniconda3/envs/astropy__astropy__5.1/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
          return hook(config_settings)
        File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 448, in get_requires_for_build_editable
          return self.get_requires_for_build_wheel(config_settings)
        File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 69, in <module>
        File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/extension_helpers/_setup_helpers.py", line 63, in get_extensions
          for setuppkg in iter_setup_packages(srcdir, packages):
        File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/extension_helpers/_setup_helpers.py", line 159, in iter_setup_packages
          module = import_file(setup_package, name=packagename + ".setup_package")
        File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/extension_helpers/_utils.py", line 136, in import_file
          loader.exec_module(mod)
        File "<frozen importlib._bootstrap_external>", line 850, in exec_module
        File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
        File "./astropy/wcs/setup_package.py", line 13, in <module>
          from setuptools.dep_util import newer_group
      ModuleNotFoundError: No module named 'setuptools.dep_util'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

WARNING  ❌ Failed on astropy__astropy-14182: Install command failed to execute successfully: Obtaining file:///astropy__astropy
           Installing build dependencies: started
           Installing build dependencies: finished with status 'done'
           Checking if build backend supports build_editable: started
           Checking if build backend supports build_editable: finished with status 'done'
           Getting requirements to build editable: started
           Getting requirements to build editable: finished with status 'error'
           error: subprocess-exited-with-error

           × Getting requirements to build editable did not run successfully.
           │ exit code: 1
           ╰─> [27 lines of output]
               Traceback (most recent call last):
                 File "/root/miniconda3/envs/astropy__astropy__5.1/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
                   main()
                 File "/root/miniconda3/envs/astropy__astropy__5.1/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
                   json_out['return_val'] = hook(**hook_input['kwargs'])
                 File "/root/miniconda3/envs/astropy__astropy__5.1/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in
         get_requires_for_build_editable
                   return hook(config_settings)
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 448, in get_requires_for_build_editable
                   return self.get_requires_for_build_wheel(config_settings)
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
                   return self._get_build_requires(config_settings, requirements=['wheel'])
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
                   self.run_setup()
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
                   exec(code, locals())
                 File "<string>", line 69, in <module>
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/extension_helpers/_setup_helpers.py", line 63, in get_extensions
                   for setuppkg in iter_setup_packages(srcdir, packages):
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/extension_helpers/_setup_helpers.py", line 159, in iter_setup_packages
                   module = import_file(setup_package, name=packagename + ".setup_package")
                 File "/tmp/pip-build-env-m0abzb6s/overlay/lib/python3.9/site-packages/extension_helpers/_utils.py", line 136, in import_file
                   loader.exec_module(mod)
                 File "<frozen importlib._bootstrap_external>", line 850, in exec_module
                 File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
                 File "./astropy/wcs/setup_package.py", line 13, in <module>
                   from setuptools.dep_util import newer_group
               ModuleNotFoundError: No module named 'setuptools.dep_util'
               [end of output]

           note: This error originates from a subprocess, and is likely not a problem with pip.
         error: subprocess-exited-with-error

         × Getting requirements to build editable did not run successfully.
         │ exit code: 1
         ╰─> See above for output.

         note: This error originates from a subprocess, and is likely not a problem with pip.

INFO     Beginning environment shutdown...

System Information

Linux x86 Python 3.9

Checklist

klieret commented 1 month ago

This is a bug in SWE-bench, let me transfer it there. SWE-agent takes the installation instructions from swebench.harness.constants.MAP_VERSION_TO_INSTALL.

PandelisZ commented 1 month ago

AHAHAHA. Yes this one killed me, I struggle to get any of it to run successfully https://github.com/princeton-nlp/SWE-bench/issues/119

JiyangZhang commented 1 month ago

Hi there,

You still had the problem?