Fix: Get env template vars from environment itself by klieret · Pull Request #425 · SWE-agent/mini-swe-agent (original) (raw)
Hi @pcmoritz thanks for taking a look :)
You're right, it's probably a little bit brittle, but also nothing really rests on this.
The motivation came from the current
{%- if system == "Darwin" -%}
<important>
You are on MacOS. For all the below examples, you need to use `sed -i ''` instead of `sed -i`.
</important>
{%- endif -%}
bit in the mini.yaml config (this is not part of the swebench.yaml). I noticed that this is going to be misleading if we run it on docker.
But you're right, another way to address this is to just not give any env equivalent.
I think either way, I wanted to move to the get_template_vars() method though because it allows the model and environment class (and subclasses thereof) a little bit more freedom to include extra information that possibly changes over the course of the run (for another project we're running mini with very limited maximum step count and we want to tell the model how many steps are left to take, for example).