Closed rookielyb closed 2 months ago
After checking the logs, I found that errors occurred when installing packages after creating the Python environment.
However, when I manually create a Docker container and run the following commands, it succeeds!!!
docker run -it --rm --name sweagent-swe-agent-latest-b9808c3a3c sweagent/swe-agent:latest
conda create --name astropyastropy5.1 --clone python3.9
source activate astropyastropy5.1 && pip install attrs==23.1.0 exceptiongroup==1.1.3 execnet==2.0.2 hypothesis==6.82.6 iniconfig==2.0.0 numpy==1.25.2 packaging==23.1 pluggy==1.3.0 psutil==5.9.5 pyerfa==2.0.0.3 pytest-arraydiff==0.5.0 pytest-astropy-header==0.2.2 pytest-astropy==0.10.0 pytest-cov==4.1.0 pytest-doctestplus==1.0.0 pytest-filter-subpackage==0.1.2 pytest-mock==3.11.1 pytest-openfiles==0.5.0 pytest-remotedata==0.4.0 pytest-xdist==3.3.1 pytest==7.4.0 PyYAML==6.0.1 setuptools==68.0.0 sortedcontainers==2.4.0 tomli==2.0.1
when I change 'pip install' to 'conda install' , also fail, The same error occurs, but the error message is different. I use mac,Looking forward to your response.
same mistake, looks like this bug relevant to https://github.com/princeton-nlp/SWE-bench/pull/130/files/708ca5b2538ba9614b8cbb58a1c88de41accc6c5#diff-85aea2e353bd26d60ba79c7eadb877870f9f6adb2b1df9718dc327e497f0a34d
So this is mostly going to be a SWE-bench
issue, however currently we have capped the SWE-bench version because we haven't updated SWE-agent to use the new SWE-bench (see #624)
Thank you very much for your response. Since this issue is occurring with multiple tasks, how should I resolve this problem now? Should I wait for your latest release of swe-agent? Thanks!
I'll update swe-agent today to remove the swe-bench version cap. Then, let's update swe-bench to the latest version and see if this still persists.
I'll update swe-agent today to remove the swe-bench version cap. Then, let's update swe-bench to the latest version and see if this still persists.
Thank you for your hard work, I am very much looking forward to it!
I reviewed your related code changes and used your recently modified code. After updating the swebench version, the error still occurs. Is the code update for this issue still ongoing?
I'll update swe-agent today to remove the swe-bench version cap. Then, let's update swe-bench to the latest version and see if this still persists.
Using the latest code swebench==2.0.11 solved the issue regarding astropyastropy-14182, but I encountered two new issues. One involves matplotlibmatplotlib-25433 (refer to Figure 1), and the other is pydata__xarray-4094. The command conda env update -f /root/environment.yml failed, and conda install cdms2 failed as well. The failure of conda install might not be limited to just this one package (refer to Figures 2 and 3). This seems to be a series of issues.
please copy the full output of the commands as text, not as a screenshot.
When you last wrote, the swe-bench PR that supposedly addresses this wasn't fixed.
I'm trying right now with the updated SWE-bench.
Also good practice to add export SWE_AGENT_LOG_STREAM_LEVEL="TRACE"
so we see the actual commands.
Also if you're just testing whether the installation works, you can use --model instant_empty_submit
to not use any LM credits.
It works for me on the astropy
issue with the latest updates:
when I run python run.py --model_name gpt4 --instance_filter matplotlib__matplotlib-25433 --config_file config/roles/default.yml --split test
INFO matplotlibmatplotlib not found in container, cloning...
DEBUG Falling back to full cloning method due to multiple instances or persistent container
TRACE Input:
git clone https://github.com/swe-bench/matplotlibmatplotlib.git matplotlibmatplotlib
TRACE Output:
Cloning into 'matplotlibmatplotlib'...
INFO Successfully cloned the repository on attempt 1
TRACE Input:
echo -n > /root/files_to_edit.txt
TRACE Output:
TRACE Input:
cd matplotlib__matplotlib
TRACE Output:
TRACE Input:
export ROOT=$(pwd -P)
TRACE Output:
TRACE Input:
git status
TRACE Output:
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
TRACE Input:
git restore .
TRACE Output:
TRACE Input:
git reset --hard 7eafdd8af3c523c1c77b027d378fb337dd489f18
TRACE Output:
HEAD is now at 7eafdd8af3 Merge pull request #25423 from jklymak/bld-pst013-compat
TRACE Input:
git clean -fdxq
TRACE Output:
TRACE Input:
export CURRENT_FILE=""
TRACE Output:
TRACE Input:
export CURRENT_LINE=0
TRACE Output:
TRACE Input:
export SEARCH_RESULTS=()
TRACE Output:
TRACE Input:
export SEARCH_FILES=()
TRACE Output:
TRACE Input:
export SEARCH_INDEX=0
TRACE Output:
TRACE Input:
source /root/miniconda3/etc/profile.d/conda.sh
TRACE Output:
TRACE Input:
uname -s
TRACE Output:
Linux
TRACE Input:
uname -m
TRACE Output:
aarch64
INFO install_configs:
{'python': '3.11', 'packages': 'environment.yml', 'install': 'python -m pip install -e .', 'pre_install':
['apt-get -y update && apt-get -y upgrade && apt-get install -y imagemagick ffmpeg texlive texlive-latex-extra
texlive-fonts-recommended texlive-xetex texlive-luatex cm-super dvipng'], 'pip_packages': ['contourpy==1.1.0',
'cycler==0.11.0', 'fonttools==4.42.1', 'ghostscript', 'kiwisolver==1.4.5', 'numpy==1.25.2', 'packaging==23.1',
'pillow==10.0.0', 'pikepdf', 'pyparsing==3.0.9', 'python-dateutil==2.8.2', 'six==1.16.0', 'setuptools==68.1.2',
'setuptools-scm==7.1.0', 'typing-extensions==4.7.1'], 'test_cmd': 'pytest -rA'}
TRACE Input:
conda env list | grep matplotlibmatplotlib3.7
TRACE Output:
INFO matplotlibmatplotlib3.7 conda env not found, creating...
WARNING ❌ Failed on matplotlib__matplotlib-25433: get_environment_yml() got an unexpected keyword argument
'python_version'
INFO Beginning environment shutdown...
INFO Agent container stopped
INFO Found image sweagent/swe-agent:latest with tags: ['sweagent/swe-agent:latest'], created:
2024-07-08T00:21:16.073900454Z for linux arm64.
DEBUG Starting container with command: docker run -i --rm --name sweagent-swe-agent-latest-59b02cf574
sweagent/swe-agent:latest /bin/bash -l
INFO 🌱 Environment Initialized
TRACE Input:
source /root/.bashrc
TRACE Output:
TRACE Input:
mkdir -p /root/commands
TRACE Output:
TRACE Input:
touch /root/commands/init.py
TRACE Output:
TRACE Input:
export PATH=$PATH:/root/commands
TRACE Output:
It works for me on the
astropy
issue with the latest updates:
Thanks to your previous modifications, I successfully ran astropy. However, I am currently encountering other errors when running different cases.
when I run python run.py --model_name gpt4 --instance_filter pydata__xarray-4094 --config_file config/roles/default.yml --split test
INFO install_configs:
{'python': '3.10', 'packages': 'environment.yml', 'install': 'python -m pip install -e .', 'pip_packages':
['numpy==1.23.0', 'packaging==23.1', 'pandas==1.5.3', 'pytest==7.4.0', 'python-dateutil==2.8.2', 'pytz==2023.3',
'six==1.16.0', 'scipy==1.11.1', 'setuptools==68.0.0'], 'no_use_env': True, 'test_cmd': 'pytest -rA'}
TRACE Input:
conda env list | grep pydataxarray0.12
TRACE Output:
INFO pydataxarray0.12 conda env not found, creating...
INFO content_env_yml name: pydataxarray0.12
channels:
pip:
numbagg
TRACE Input:
conda create -c conda-forge -n pydataxarray0.12 python=3.10 -y
TRACE Output:
Retrieving notices: ...working... done
Channels:
defaults
Platform: linux-aarch64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
environment location: /root/miniconda3/envs/pydataxarray0.12
added / updated specs:
python=3.10
The following packages will be downloaded:
package | build
---------------------------|-----------------
_openmp_mutex-4.5 | 2_gnu 23 KB conda-forge
bzip2-1.0.8 | h68df207_7 185 KB conda-forge
ca-certificates-2024.7.4 | hcefe29a_0 151 KB conda-forge
ld_impl_linux-aarch64-2.40 | h9fc2d93_7 719 KB conda-forge
libffi-3.4.2 | h3557bc0_5 58 KB conda-forge
libgcc-ng-14.1.0 | he277a41_0 520 KB conda-forge
libgomp-14.1.0 | he277a41_0 449 KB conda-forge
libnsl-2.0.1 | h31becfc_0 34 KB conda-forge
libsqlite-3.46.0 | hf51ef55_0 1019 KB conda-forge
libuuid-2.38.1 | hb4cce97_0 35 KB conda-forge
libxcrypt-4.4.36 | h31becfc_1 112 KB conda-forge
libzlib-1.3.1 | h68df207_1 66 KB conda-forge
ncurses-6.5 | h0425590_0 903 KB conda-forge
openssl-3.3.1 | h68df207_2 3.3 MB conda-forge
pip-24.0 | pyhd8ed1ab_0 1.3 MB conda-forge
python-3.10.14 |hbbe8eec_0_cpython 12.5 MB conda-forge
readline-8.2 | h8fc344f_1 287 KB conda-forge
setuptools-71.0.1 | pyhd8ed1ab_0 1.3 MB conda-forge
tk-8.6.13 | h194ca79_0 3.2 MB conda-forge
tzdata-2024a | h0c530f3_0 117 KB conda-forge
wheel-0.43.0 | pyhd8ed1ab_1 57 KB conda-forge
xz-5.2.6 | h9cdd2b7_0 430 KB conda-forge
------------------------------------------------------------
Total: 26.7 MB
The following NEW packages will be INSTALLED:
_openmp_mutex conda-forge/linux-aarch64::_openmp_mutex-4.5-2_gnu
bzip2 conda-forge/linux-aarch64::bzip2-1.0.8-h68df207_7
ca-certificates conda-forge/linux-aarch64::ca-certificates-2024.7.4-hcefe29a_0
ld_impl_linux-aar~ conda-forge/linux-aarch64::ld_impl_linux-aarch64-2.40-h9fc2d93_7
libffi conda-forge/linux-aarch64::libffi-3.4.2-h3557bc0_5
libgcc-ng conda-forge/linux-aarch64::libgcc-ng-14.1.0-he277a41_0
libgomp conda-forge/linux-aarch64::libgomp-14.1.0-he277a41_0
libnsl conda-forge/linux-aarch64::libnsl-2.0.1-h31becfc_0
libsqlite conda-forge/linux-aarch64::libsqlite-3.46.0-hf51ef55_0
libuuid conda-forge/linux-aarch64::libuuid-2.38.1-hb4cce97_0
libxcrypt conda-forge/linux-aarch64::libxcrypt-4.4.36-h31becfc_1
libzlib conda-forge/linux-aarch64::libzlib-1.3.1-h68df207_1
ncurses conda-forge/linux-aarch64::ncurses-6.5-h0425590_0
openssl conda-forge/linux-aarch64::openssl-3.3.1-h68df207_2
pip conda-forge/noarch::pip-24.0-pyhd8ed1ab_0
python conda-forge/linux-aarch64::python-3.10.14-hbbe8eec_0_cpython
readline conda-forge/linux-aarch64::readline-8.2-h8fc344f_1
setuptools conda-forge/noarch::setuptools-71.0.1-pyhd8ed1ab_0
tk conda-forge/linux-aarch64::tk-8.6.13-h194ca79_0
tzdata conda-forge/noarch::tzdata-2024a-h0c530f3_0
wheel conda-forge/noarch::wheel-0.43.0-pyhd8ed1ab_1
xz conda-forge/linux-aarch64::xz-5.2.6-h9cdd2b7_0
Downloading and Extracting Packages: ...working... done
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
DEBUG Created conda environment
INFO 存在environment.yml时安装包:
conda env update -f /root/environment.yml
TRACE Input:
conda env update -f /root/environment.yml
TRACE Output:
Channels:
conda-forge
Platform: linux-aarch64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed
PackagesNotFoundError: The following packages are not available from current channels:
- cdms2
Current channels:
- https://conda.anaconda.org/conda-forge/linux-aarch64
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
ERROR Failed to install environment.yml: Channels:
conda-forge
Platform: linux-aarch64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed
PackagesNotFoundError: The following packages are not available from current channels:
- cdms2
Current channels:
- https://conda.anaconda.org/conda-forge/linux-aarch64
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
INFO Beginning environment shutdown...
INFO Agent container stopped
WARNING ❌ Failed on pydata__xarray-4094: Failed to install environment.yml: Channels:
I am not sure if the information I provided is sufficient, but I hope it can help you identify the issue
Could you create a new issue for xarray
? I want to close this because it was originally for astropy
Also which OS are you on? pydata works fine for me on Linux (I think there are some few known cases where things don't properly set up on OSX)
I created an issue for the matplotlib
one that I can reproduce (#689)
Describe the issue
~python run.py --model_name gpt4 --instance_filter astropy__astropy-14182 --config_file config/roles/default.yml ~
Edit @klieret : actually need to run:
Optional: Relevant documentation page
No response