princeton-nlp / SWE-bench

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

Fix so it doesn't crash when no env imgs to build #164

Closed JunShern closed 3 months ago

JunShern commented 3 months ago

Reference Issues/PRs

What does this implement/fix? Explain your changes.

If you run python -m swebench.harness.prepare_images with all env images already built, build_env_images exits early and returns None. This causes the program to crash here because it expects a Tuple[list, list]. Easy fix just returns two empty lists when we exit early.

Any other comments?

🧡 Thanks for contributing!

john-b-yang commented 3 months ago

Sweet, thanks @JunShern for catching this! Makes sense. I also tried this out locally and it works great 😄 merged!