allow specifying max iter in cmdline script

This commit is contained in:
Xingyao Wang 2024-05-28 22:42:30 +08:00
parent 832a82867f
commit 95eb048672

View File

@ -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"