From 95eb0486725fecdb0d70d6d891acf5ac3b248865 Mon Sep 17 00:00:00 2001 From: Xingyao Wang Date: Tue, 28 May 2024 22:42:30 +0800 Subject: [PATCH] allow specifying max iter in cmdline script --- evaluation/swe_bench/scripts/run_infer.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/evaluation/swe_bench/scripts/run_infer.sh b/evaluation/swe_bench/scripts/run_infer.sh index e70c0c431a..609b06ae66 100755 --- a/evaluation/swe_bench/scripts/run_infer.sh +++ b/evaluation/swe_bench/scripts/run_infer.sh @@ -2,12 +2,18 @@ MODEL_CONFIG=$1 AGENT=$2 EVAL_LIMIT=$3 +MAX_ITER=$4 if [ -z "$AGENT" ]; then echo "Agent not specified, use default CodeActAgent" AGENT="CodeActAgent" fi +if [ -z "$MAX_ITER" ]; then + echo "MAX_ITER not specified, use default 30" + MAX_ITER=30 +fi + # IMPORTANT: Because Agent's prompt changes fairly often in the rapidly evolving codebase of OpenDevin # We need to track the version of Agent in the evaluation to make sure results are comparable AGENT_VERSION=v$(poetry run python -c "import agenthub; from opendevin.controller.agent import Agent; print(Agent.get_cls('$AGENT').VERSION)") @@ -32,7 +38,7 @@ unset SANDBOX_ENV_GITHUB_TOKEN # prevent the agent from using the github token t COMMAND="poetry run python evaluation/swe_bench/run_infer.py \ --agent-cls $AGENT \ --llm-config $MODEL_CONFIG \ - --max-iterations 30 \ + --max-iterations $MAX_ITER \ --max-chars 10000000 \ --eval-num-workers 8 \ --eval-note $EVAL_NOTE"