Datasets:
How to build docker image for each instance?
Will docker image be published recently?
Or, if I would like to build docker image to test each instance, is that correctly if I use environment
as yaml to Build Docker image, and intall by install_config
?
Hi!
Yes, we’re planning to publish the remaining Docker images we’ve built in early August.
For now, you can use the images from the SWE-rebench-leaderboard which is a subset of tasks from the SWE-rebench.
Alternatively, you can build Docker images yourself using the install_config
field — each task has its own install recipe. Our fork supports building with these configs directly from the data.
Let me know if anything is unclear or if you have more questions!
Hi!
@ludybupt
We’ve published a cleaned subset of ≈7,500 Docker images – the set we actively use for RL training. You can pull them from Docker Hub:
https://hub.docker.com/repositories/swerebench
(same naming scheme as the original SWE-bench)
To run them, either use our SWE-bench fork (README has a one-line example) or copy the small test_cmd/log-parser changes into your own setup.
We don’t plan to upload the full ~20 K images right now. However, you can build other images, if you wish. We’re preparing a larger, more refined release. If you train on this subset, please drop me a note at [email protected] – your feedback will help shape the next version.
Hi @ibragim-bad , I follow your swe-bench-fork code to build the remaining images. I try to build100 images and found around 30 images failed. Besides, among 70 images builded, there are around 20 instances failed in passing the tests. Could you help look into the issue? Thank you for your greate contributions :)
Hi!
@JierunChen
, could you please send me the instance_ids of the 100 images, and let me know which ones have not been built and which ones have failed?
You can either reply here or email me at [email protected]
Hi @ibragim-bad , thanks for the instant reply. Here's the info.
gold_patch_results
{
"total_instances": 100,
"completed_instances": 77,
"resolved_instances": 50,
"unresolved_instances": 27,
"empty_patch_instances": 0,
"error_instances": 23,
"resolved_ids": [
"Juniper__py-junos-eznc-351",
"Polyconseil__getconf-11",
"Pylons__webob-183",
"Pylons__webob-185",
"Shopify__shopify_python_api-89",
"Shopify__shopify_python_api-94",
"Turbo87__utm-12",
"bokeh__bokeh-1641",
"bokeh__bokeh-1760",
"bokeh__bokeh-2052",
"caesar0301__treelib-40",
"chimpler__pyhocon-13",
"crccheck__postdoc-17",
"eadhost__eadator-2",
"ekalinin__nodeenv-118",
"enthought__okonomiyaki-34",
"falconry__falcon-494",
"falconry__falcon-505",
"falconry__falcon-511",
"gabrielfalcao__HTTPretty-207",
"google__vimdoc-89",
"google__yapf-75",
"grampajoe__happy-6",
"ipython__ipython-7469",
"ipython__ipython-7819",
"ipython__ipython-7872",
"ipython__ipython-8030",
"ipython__ipython-8111",
"jacebrowning__dropthebeat-25",
"jacebrowning__yorm-52",
"jpadilla__pyjwt-122",
"jpadilla__pyjwt-71",
"jubatus__jubatus-python-client-36",
"kissmetrics__py-KISSmetrics-27",
"klen__graphite-beacon-32",
"martinblech__xmltodict-81",
"ministryofjustice__salt-shaker-21",
"mkdocs__mkdocs-402",
"mkdocs__mkdocs-443",
"msgpack__msgpack-python-105",
"networkx__networkx-1328",
"networkx__networkx-1407",
"nose-devs__nose2-232",
"pozytywnie__webapp-health-monitor-12",
"richardkiss__pycoin-108",
"richardkiss__pycoin-88",
"tornadoweb__tornado-1373",
"uqfoundation__dill-72",
"wearpants__twiggy-49",
"wndhydrnt__python-oauth2-38"
],
"unresolved_ids": [
"miki725__importanize-22",
"sympy__sympy-8627",
"sympy__sympy-8688",
"sympy__sympy-8693",
"sympy__sympy-8723",
"sympy__sympy-8744",
"sympy__sympy-8765",
"sympy__sympy-8778",
"sympy__sympy-8784",
"sympy__sympy-8826",
"sympy__sympy-8835",
"sympy__sympy-8837",
"sympy__sympy-8841",
"sympy__sympy-8846",
"sympy__sympy-8935",
"sympy__sympy-8976",
"sympy__sympy-8985",
"sympy__sympy-9010",
"sympy__sympy-9063",
"sympy__sympy-9071",
"sympy__sympy-9084",
"sympy__sympy-9105",
"sympy__sympy-9139",
"sympy__sympy-9148",
"sympy__sympy-9156",
"sympy__sympy-9179",
"sympy__sympy-9306"
],
"error_ids": [
"CleanCut__green-40",
"Pylons__webob-192",
"ReactiveX__RxPY-37",
"jpadilla__pyjwt-131",
"marshmallow-code__marshmallow-168",
"mkdocs__mkdocs-390",
"mkdocs__mkdocs-395",
"mkdocs__mkdocs-435",
"msiemens__tinydb-46",
"nose-devs__nose2-234",
"pre-commit__pre-commit-hooks-39",
"softlayer__softlayer-python-457",
"softlayer__softlayer-python-481",
"softlayer__softlayer-python-518",
"softlayer__softlayer-python-523",
"softlayer__softlayer-python-524",
"softlayer__softlayer-python-526",
"sympy__sympy-8785",
"sympy__sympy-9040",
"sympy__sympy-9078",
"sympy__sympy-9131",
"sympy__sympy-9198",
"thisfred__val-9"
],
"schema_version": 2
}
I'll take a look!
@JierunChen
Thanks for the catch! I found a couple of moments.
Important to note, the fork we published is not the same code we use for build and eval internally.
I ran checks on our pipelines and all these 50 at least were built successfully.
There is some difference between the public fork and our code, I tried to minimize this difference.
I added 2 small data preprocessing fixes into the fork:
https://github.com/SWE-rebench/SWE-bench-fork/commit/d307ff9f2168a0448843c0d5881d2cd498d9f73f
The thing is, Hugging Face makes structure common for install_config, and even if some fields are missing, it sets them to None. Later they are processed not correctly in swe-bench itself. I added a small function in data loading which removes such fields. This should help fix part of the problems.
Also, conda does not support Python < 3.6, so when installing with conda some instances may fail. I added a function in the fork to handle this case.
Please check with updated fork code and then we will see further.
Thanks @ibragim-bad I've tried with your commit. It help building more successful env. Yet I still got a high ratio of unresolved intances, e.g. 33 out of 91. Here's the breakdown.
gold_patch_results_v2
{
"total_instances": 100,
"completed_instances": 91,
"resolved_instances": 58,
"unresolved_instances": 33,
"empty_patch_instances": 0,
"error_instances": 9,
"resolved_ids": [
"CleanCut__green-40",
"Juniper__py-junos-eznc-351",
"Polyconseil__getconf-11",
"Pylons__webob-183",
"Pylons__webob-185",
"Pylons__webob-192",
"ReactiveX__RxPY-37",
"Shopify__shopify_python_api-89",
"Shopify__shopify_python_api-94",
"Turbo87__utm-12",
"bokeh__bokeh-1641",
"bokeh__bokeh-1760",
"bokeh__bokeh-2052",
"caesar0301__treelib-40",
"chimpler__pyhocon-13",
"crccheck__postdoc-17",
"eadhost__eadator-2",
"ekalinin__nodeenv-118",
"enthought__okonomiyaki-34",
"falconry__falcon-494",
"falconry__falcon-505",
"falconry__falcon-511",
"gabrielfalcao__HTTPretty-207",
"google__vimdoc-89",
"google__yapf-75",
"grampajoe__happy-6",
"ipython__ipython-7469",
"ipython__ipython-7819",
"ipython__ipython-7872",
"ipython__ipython-8030",
"ipython__ipython-8111",
"jacebrowning__dropthebeat-25",
"jacebrowning__yorm-52",
"jpadilla__pyjwt-122",
"jpadilla__pyjwt-131",
"jpadilla__pyjwt-71",
"jubatus__jubatus-python-client-36",
"kissmetrics__py-KISSmetrics-27",
"klen__graphite-beacon-32",
"martinblech__xmltodict-81",
"ministryofjustice__salt-shaker-21",
"mkdocs__mkdocs-395",
"mkdocs__mkdocs-402",
"mkdocs__mkdocs-435",
"mkdocs__mkdocs-443",
"msgpack__msgpack-python-105",
"msiemens__tinydb-46",
"networkx__networkx-1328",
"networkx__networkx-1407",
"nose-devs__nose2-232",
"nose-devs__nose2-234",
"pozytywnie__webapp-health-monitor-12",
"richardkiss__pycoin-108",
"richardkiss__pycoin-88",
"tornadoweb__tornado-1373",
"uqfoundation__dill-72",
"wearpants__twiggy-49",
"wndhydrnt__python-oauth2-38"
],
"unresolved_ids": [
"miki725__importanize-22",
"mkdocs__mkdocs-390",
"sympy__sympy-8627",
"sympy__sympy-8688",
"sympy__sympy-8693",
"sympy__sympy-8723",
"sympy__sympy-8744",
"sympy__sympy-8765",
"sympy__sympy-8778",
"sympy__sympy-8784",
"sympy__sympy-8785",
"sympy__sympy-8826",
"sympy__sympy-8835",
"sympy__sympy-8837",
"sympy__sympy-8841",
"sympy__sympy-8846",
"sympy__sympy-8935",
"sympy__sympy-8976",
"sympy__sympy-8985",
"sympy__sympy-9010",
"sympy__sympy-9040",
"sympy__sympy-9063",
"sympy__sympy-9071",
"sympy__sympy-9078",
"sympy__sympy-9084",
"sympy__sympy-9105",
"sympy__sympy-9131",
"sympy__sympy-9139",
"sympy__sympy-9148",
"sympy__sympy-9156",
"sympy__sympy-9179",
"sympy__sympy-9198",
"sympy__sympy-9306"
],
"error_ids": [
"marshmallow-code__marshmallow-168",
"pre-commit__pre-commit-hooks-39",
"softlayer__softlayer-python-457",
"softlayer__softlayer-python-481",
"softlayer__softlayer-python-518",
"softlayer__softlayer-python-523",
"softlayer__softlayer-python-524",
"softlayer__softlayer-python-526",
"thisfred__val-9"
],
"schema_version": 2
}
Thanks @ibragim-bad Here's the updated results. We are almost there. Now the resolved rate reaches 90%.
gold_patch_results_v3
{
"total_instances": 100,
"completed_instances": 92,
"resolved_instances": 90,
"unresolved_instances": 2,
"empty_patch_instances": 0,
"error_instances": 8,
"resolved_ids": [
"CleanCut__green-40",
"Juniper__py-junos-eznc-351",
"Polyconseil__getconf-11",
"Pylons__webob-183",
"Pylons__webob-185",
"Pylons__webob-192",
"ReactiveX__RxPY-37",
"Shopify__shopify_python_api-89",
"Shopify__shopify_python_api-94",
"Turbo87__utm-12",
"bokeh__bokeh-1641",
"bokeh__bokeh-1760",
"bokeh__bokeh-2052",
"caesar0301__treelib-40",
"chimpler__pyhocon-13",
"crccheck__postdoc-17",
"eadhost__eadator-2",
"ekalinin__nodeenv-118",
"enthought__okonomiyaki-34",
"falconry__falcon-494",
"falconry__falcon-505",
"falconry__falcon-511",
"gabrielfalcao__HTTPretty-207",
"google__vimdoc-89",
"google__yapf-75",
"grampajoe__happy-6",
"ipython__ipython-7469",
"ipython__ipython-7819",
"ipython__ipython-7872",
"ipython__ipython-8030",
"ipython__ipython-8111",
"jacebrowning__dropthebeat-25",
"jacebrowning__yorm-52",
"jpadilla__pyjwt-122",
"jpadilla__pyjwt-131",
"jpadilla__pyjwt-71",
"jubatus__jubatus-python-client-36",
"kissmetrics__py-KISSmetrics-27",
"klen__graphite-beacon-32",
"marshmallow-code__marshmallow-168",
"martinblech__xmltodict-81",
"ministryofjustice__salt-shaker-21",
"mkdocs__mkdocs-395",
"mkdocs__mkdocs-402",
"mkdocs__mkdocs-435",
"mkdocs__mkdocs-443",
"msgpack__msgpack-python-105",
"msiemens__tinydb-46",
"networkx__networkx-1328",
"networkx__networkx-1407",
"nose-devs__nose2-232",
"nose-devs__nose2-234",
"pozytywnie__webapp-health-monitor-12",
"richardkiss__pycoin-108",
"richardkiss__pycoin-88",
"sympy__sympy-8627",
"sympy__sympy-8688",
"sympy__sympy-8693",
"sympy__sympy-8723",
"sympy__sympy-8744",
"sympy__sympy-8765",
"sympy__sympy-8778",
"sympy__sympy-8784",
"sympy__sympy-8785",
"sympy__sympy-8826",
"sympy__sympy-8835",
"sympy__sympy-8837",
"sympy__sympy-8841",
"sympy__sympy-8846",
"sympy__sympy-8935",
"sympy__sympy-8976",
"sympy__sympy-8985",
"sympy__sympy-9010",
"sympy__sympy-9040",
"sympy__sympy-9063",
"sympy__sympy-9071",
"sympy__sympy-9078",
"sympy__sympy-9084",
"sympy__sympy-9105",
"sympy__sympy-9131",
"sympy__sympy-9139",
"sympy__sympy-9148",
"sympy__sympy-9156",
"sympy__sympy-9179",
"sympy__sympy-9198",
"sympy__sympy-9306",
"tornadoweb__tornado-1373",
"uqfoundation__dill-72",
"wearpants__twiggy-49",
"wndhydrnt__python-oauth2-38"
],
"unresolved_ids": [
"miki725__importanize-22",
"mkdocs__mkdocs-390"
],
"error_ids": [
"pre-commit__pre-commit-hooks-39",
"softlayer__softlayer-python-457",
"softlayer__softlayer-python-481",
"softlayer__softlayer-python-518",
"softlayer__softlayer-python-523",
"softlayer__softlayer-python-524",
"softlayer__softlayer-python-526",
"thisfred__val-9"
],
"schema_version": 2
}
Updated once more, should be better. Two instances are still unresolved, will check them next week.
Nice @ibragim-bad . The resolved rate now reaches 97 out of 100.
gold_patch_results_v4
"total_instances": 100,
"completed_instances": 99,
"resolved_instances": 97,
"unresolved_instances": 2,
"empty_patch_instances": 0,
"error_instances": 1,
"resolved_ids": [
"CleanCut__green-40",
"Juniper__py-junos-eznc-351",
"Polyconseil__getconf-11",
"Pylons__webob-183",
"Pylons__webob-185",
"Pylons__webob-192",
"ReactiveX__RxPY-37",
"Shopify__shopify_python_api-89",
"Shopify__shopify_python_api-94",
"Turbo87__utm-12",
"bokeh__bokeh-1641",
"bokeh__bokeh-1760",
"bokeh__bokeh-2052",
"caesar0301__treelib-40",
"chimpler__pyhocon-13",
"crccheck__postdoc-17",
"eadhost__eadator-2",
"ekalinin__nodeenv-118",
"enthought__okonomiyaki-34",
"falconry__falcon-494",
"falconry__falcon-505",
"falconry__falcon-511",
"gabrielfalcao__HTTPretty-207",
"google__vimdoc-89",
"google__yapf-75",
"grampajoe__happy-6",
"ipython__ipython-7469",
"ipython__ipython-7819",
"ipython__ipython-7872",
"ipython__ipython-8030",
"ipython__ipython-8111",
"jacebrowning__dropthebeat-25",
"jacebrowning__yorm-52",
"jpadilla__pyjwt-122",
"jpadilla__pyjwt-131",
"jpadilla__pyjwt-71",
"jubatus__jubatus-python-client-36",
"kissmetrics__py-KISSmetrics-27",
"klen__graphite-beacon-32",
"marshmallow-code__marshmallow-168",
"martinblech__xmltodict-81",
"ministryofjustice__salt-shaker-21",
"mkdocs__mkdocs-395",
"mkdocs__mkdocs-402",
"mkdocs__mkdocs-435",
"mkdocs__mkdocs-443",
"msgpack__msgpack-python-105",
"msiemens__tinydb-46",
"networkx__networkx-1328",
"networkx__networkx-1407",
"nose-devs__nose2-232",
"nose-devs__nose2-234",
"pozytywnie__webapp-health-monitor-12",
"richardkiss__pycoin-108",
"richardkiss__pycoin-88",
"softlayer__softlayer-python-457",
"softlayer__softlayer-python-481",
"softlayer__softlayer-python-518",
"softlayer__softlayer-python-523",
"softlayer__softlayer-python-524",
"softlayer__softlayer-python-526",
"sympy__sympy-8627",
"sympy__sympy-8688",
"sympy__sympy-8693",
"sympy__sympy-8723",
"sympy__sympy-8744",
"sympy__sympy-8765",
"sympy__sympy-8778",
"sympy__sympy-8784",
"sympy__sympy-8785",
"sympy__sympy-8826",
"sympy__sympy-8835",
"sympy__sympy-8837",
"sympy__sympy-8841",
"sympy__sympy-8846",
"sympy__sympy-8935",
"sympy__sympy-8976",
"sympy__sympy-8985",
"sympy__sympy-9010",
"sympy__sympy-9040",
"sympy__sympy-9063",
"sympy__sympy-9071",
"sympy__sympy-9078",
"sympy__sympy-9084",
"sympy__sympy-9105",
"sympy__sympy-9131",
"sympy__sympy-9139",
"sympy__sympy-9148",
"sympy__sympy-9156",
"sympy__sympy-9179",
"sympy__sympy-9198",
"sympy__sympy-9306",
"thisfred__val-9",
"tornadoweb__tornado-1373",
"uqfoundation__dill-72",
"wearpants__twiggy-49",
"wndhydrnt__python-oauth2-38"
],
"unresolved_ids": [
"miki725__importanize-22",
"mkdocs__mkdocs-390"
],
"error_ids": [
"pre-commit__pre-commit-hooks-39"
],
"schema_version": 2
}
</details>
Hi
@ibragim-bad
, I've fixed the error instance: "pre-commit__pre-commit-hooks-39".
The issue is in the exclude_line
function in python.py
around line 90.
Problem: When a repository's requirements.txt file contains just a dot ., it gets included in the generated requirements.txt file for the Docker build. This causes pip to try to install the current directory as a package, but the current directory doesn't have a setup.py or pyproject.toml file, leading to the error:
ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
Solution: Modify the exclude_line
function to also exclude lines that are just a dot:
# Current code (around line 95-97):
exclude_line = lambda line: any(
[line.strip().startswith(x) for x in ["-e .", "#", ".[test"]]
)
# Fixed code:
exclude_line = lambda line: any(
[line.strip().startswith(x) for x in ["-e .", "#", ".[test"]]
) or line.strip() == "."
This change will prevent lines containing just a dot from being included in the requirements.txt file used during Docker image building, which should resolve the build error.
Nice catch!
I remembered some other things that can be different between our internal framework and this fork, so I fixed a couple more points.
It should solve almost everything.
But I could not fix the mkdocs part.
The thing is, in our pipelines we use folder /{project_name}, but SWE-bench uses /testbed.
We changed our images to be the same as SWE-bench. And there are differences between our internal pipeline and this one.
Here in the test it expects /{project_name}, not /testbed. And because of test specifics, just a symlink will not solve it.