π OpenHands: AI-Driven Development
Add NUM_WORKERS variable to run_infer.sh scripts for configurable woker settings (#2597)
Graham Neubigcab7a288ca0b
diff --git a/evaluation/EDA/scripts/run_infer.sh b/evaluation/EDA/scripts/run_infer.shold mode 100755new mode 100644index 0e0d58ebdb..eeaa43a830--- a/evaluation/EDA/scripts/run_infer.sh+++ b/evaluation/EDA/scripts/run_infer.sh@@ -8,7 +8,12 @@ COMMIT_HASH=$2AGENT=$3DATASET=$4EVAL_LIMIT=$5+NUM_WORKERS=$6+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+ficheckout_eval_branchif [ -z "$AGENT" ]; then@@ -46,7 +51,7 @@ COMMAND="poetry run python evaluation/EDA/run_infer.py \--max-iterations 20 \--OPENAI_API_KEY $OPENAI_API_KEY \--max-chars 10000000 \- --eval-num-workers 1 \+ --eval-num-workers $NUM_WORKERS \--eval-note ${AGENT_VERSION}_${DATASET}"if [ -n "$EVAL_LIMIT" ]; thendiff --git a/evaluation/agent_bench/scripts/run_infer.sh b/evaluation/agent_bench/scripts/run_infer.shold mode 100755new mode 100644index 64023973af..2d9bc66d31--- a/evaluation/agent_bench/scripts/run_infer.sh+++ b/evaluation/agent_bench/scripts/run_infer.sh@@ -7,7 +7,12 @@ MODEL_CONFIG=$1COMMIT_HASH=$2AGENT=$3EVAL_LIMIT=$4+NUM_WORKERS=$5+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+ficheckout_eval_branchif [ -z "$AGENT" ]; then@@ -26,7 +31,7 @@ COMMAND="export PYTHONPATH=evaluation/agent_bench:\$PYTHONPATH && poetry run pyt--llm-config $MODEL_CONFIG \--max-iterations 30 \--max-chars 10000000 \- --eval-num-workers 5 \+ --eval-num-workers $NUM_WORKERS \--eval-note $AGENT_VERSION"if [ -n "$EVAL_LIMIT" ]; thendiff --git a/evaluation/biocoder/scripts/run_infer.sh b/evaluation/biocoder/scripts/run_infer.shold mode 100755new mode 100644index 85c57e88b8..814196a982--- a/evaluation/biocoder/scripts/run_infer.sh+++ b/evaluation/biocoder/scripts/run_infer.sh@@ -8,7 +8,12 @@ COMMIT_HASH=$2AGENT=$3EVAL_LIMIT=$4DATASET="biocoder"+NUM_WORKERS=$5+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+ficheckout_eval_branchif [ -z "$AGENT" ]; then@@ -28,7 +33,7 @@ COMMAND="poetry run python evaluation/biocoder/run_infer.py \--llm-config $MODEL_CONFIG \--max-iterations 10 \--max-chars 10000000 \- --eval-num-workers 1 \+ --eval-num-workers $NUM_WORKERS \--eval-note ${AGENT_VERSION}_${DATASET}"if [ -n "$EVAL_LIMIT" ]; thendiff --git a/evaluation/bird/scripts/run_infer.sh b/evaluation/bird/scripts/run_infer.shold mode 100755new mode 100644index 7776d1f782..a9d1717b7d--- a/evaluation/bird/scripts/run_infer.sh+++ b/evaluation/bird/scripts/run_infer.sh@@ -7,7 +7,12 @@ MODEL_CONFIG=$1COMMIT_HASH=$2AGENT=$3EVAL_LIMIT=$4+NUM_WORKERS=$5+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+ficheckout_eval_branchif [ -z "$AGENT" ]; then@@ -26,7 +31,7 @@ COMMAND="poetry run python evaluation/bird/run_infer.py \--llm-config $MODEL_CONFIG \--max-iterations 5 \--max-chars 10000000 \- --eval-num-workers 1 \+ --eval-num-workers $NUM_WORKERS \--eval-note $AGENT_VERSION" \if [ -n "$EVAL_LIMIT" ]; thendiff --git a/evaluation/gaia/scripts/run_infer.sh b/evaluation/gaia/scripts/run_infer.shold mode 100755new mode 100644index 9f50f9f444..54f427ea10--- a/evaluation/gaia/scripts/run_infer.sh+++ b/evaluation/gaia/scripts/run_infer.sh@@ -8,7 +8,12 @@ COMMIT_HASH=$2AGENT=$3EVAL_LIMIT=$4LEVELS=$5+NUM_WORKERS=$6+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+ficheckout_eval_branchif [ -z "$AGENT" ]; then@@ -37,7 +42,7 @@ COMMAND="poetry run python ./evaluation/gaia/run_infer.py \--level $LEVELS \--data-split validation \--max-chars 10000000 \- --eval-num-workers 1 \+ --eval-num-workers $NUM_WORKERS \--eval-note ${AGENT_VERSION}_${LEVELS}"if [ -n "$EVAL_LIMIT" ]; thendiff --git a/evaluation/gorilla/scripts/run_infer.sh b/evaluation/gorilla/scripts/run_infer.shindex 468b89c220..5923a554bc 100644--- a/evaluation/gorilla/scripts/run_infer.sh+++ b/evaluation/gorilla/scripts/run_infer.sh@@ -8,7 +8,12 @@ COMMIT_HASH=$2AGENT=$3EVAL_LIMIT=$4HUBS=$5+NUM_WORKERS=$6+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+ficheckout_eval_branchif [ -z "$AGENT" ]; then@@ -35,7 +40,7 @@ COMMAND="poetry run python evaluation/gorilla/run_infer.py \--hubs $HUBS \--data-split validation \--max-chars 10000000 \- --eval-num-workers 1 \+ --eval-num-workers $NUM_WORKERS \--eval-note ${AGENT_VERSION}_${LEVELS}"if [ -n "$EVAL_LIMIT" ]; thendiff --git a/evaluation/gpqa/scripts/run_infer.sh b/evaluation/gpqa/scripts/run_infer.shold mode 100755new mode 100644index 43326a30cd..dc9e927c49--- a/evaluation/gpqa/scripts/run_infer.sh+++ b/evaluation/gpqa/scripts/run_infer.sh@@ -8,7 +8,12 @@ COMMIT_HASH=$2EVAL_LIMIT=$3DATA_SPLIT=$4AGENT=$5+NUM_WORKERS=$6+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+ficheckout_eval_branchif [ -z "$AGENT" ]; then@@ -33,7 +38,7 @@ COMMAND="poetry run python evaluation/gpqa/run_infer.py \--llm-config $MODEL_CONFIG \--max-iterations 10 \--max-chars 10000000 \- --eval-num-workers 1 \+ --eval-num-workers $NUM_WORKERS \--data-split $DATA_SPLIT \--eval-note $AGENT_VERSION"diff --git a/evaluation/humanevalfix/scripts/run_infer.sh b/evaluation/humanevalfix/scripts/run_infer.shold mode 100755new mode 100644index c61b1be309..abd8a4be83--- a/evaluation/humanevalfix/scripts/run_infer.sh+++ b/evaluation/humanevalfix/scripts/run_infer.sh@@ -7,7 +7,12 @@ MODEL_CONFIG=$1COMMIT_HASH=$2AGENT=$3EVAL_LIMIT=$4+NUM_WORKERS=$5+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+fiecho "################################################################################!!!WARNING!!!@@ -64,7 +69,7 @@ COMMAND="poetry run python evaluation/humanevalfix/run_infer.py \--llm-config $MODEL_CONFIG \--max-iterations 10 \--max-chars 10000000 \- --eval-num-workers 1 \+ --eval-num-workers $NUM_WORKERS \--eval-note $AGENT_VERSION"if [ -n "$EVAL_LIMIT" ]; thendiff --git a/evaluation/logic_reasoning/scripts/run_infer.sh b/evaluation/logic_reasoning/scripts/run_infer.shold mode 100755new mode 100644index 5c7748b3c9..b7cec5cd54--- a/evaluation/logic_reasoning/scripts/run_infer.sh+++ b/evaluation/logic_reasoning/scripts/run_infer.sh@@ -8,7 +8,12 @@ MODEL_CONFIG=$2COMMIT_HASH=$3EVAL_LIMIT=$4AGENT=$5+NUM_WORKERS=$6+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+fi# ################################################################################checkout_eval_branch@@ -30,7 +35,7 @@ COMMAND="poetry run python evaluation/logic_reasoning/run_infer.py \--dataset $DATASET \--max-iterations 10 \--max-chars 10000000 \- --eval-num-workers 1 \+ --eval-num-workers $NUM_WORKERS \--eval-note $AGENT_VERSION"if [ -n "$EVAL_LIMIT" ]; thendiff --git a/evaluation/miniwob/scripts/run_infer.sh b/evaluation/miniwob/scripts/run_infer.shold mode 100755new mode 100644index b1dc24a147..e6131b8c98--- a/evaluation/miniwob/scripts/run_infer.sh+++ b/evaluation/miniwob/scripts/run_infer.sh@@ -16,7 +16,12 @@ COMMIT_HASH=$2AGENT=$3NOTE=$4EVAL_LIMIT=$5+NUM_WORKERS=$6+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+ficheckout_eval_branchif [ -z "$AGENT" ]; then@@ -37,7 +42,7 @@ COMMAND="poetry run python evaluation/miniwob/run_infer.py \--llm-config $MODEL_CONFIG \--max-iterations 10 \--max-chars 10000000 \- --eval-note $EVAL_NOTE"+ --eval-num-workers $NUM_WORKERS \if [ -n "$EVAL_LIMIT" ]; thenecho "EVAL_LIMIT: $EVAL_LIMIT"diff --git a/evaluation/mint/scripts/run_infer.sh b/evaluation/mint/scripts/run_infer.shindex 6d6a6510b0..8c8e017aa8 100644--- a/evaluation/mint/scripts/run_infer.sh+++ b/evaluation/mint/scripts/run_infer.sh@@ -7,7 +7,12 @@ MODEL_CONFIG=$1COMMIT_HASH=$2SUBSET=$3EVAL_LIMIT=$4+NUM_WORKERS=$5+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+ficheckout_eval_branch# Only 'CodeActAgent' is supported for MINT now@@ -24,7 +29,7 @@ COMMAND="poetry run python ./evaluation/mint/run_infer.py \--llm-config $MODEL_CONFIG \--max-iterations 5 \--max-propose-solution 2 \- --eval-note $AGENT_VERSION"+ --eval-num-workers $NUM_WORKERS \if [ -n "$SUBSET" ]; thenecho "SUBSET: $SUBSET"diff --git a/evaluation/ml_bench/scripts/run_infer.sh b/evaluation/ml_bench/scripts/run_infer.shold mode 100755new mode 100644index 98bc528c63..4ecbae514a--- a/evaluation/ml_bench/scripts/run_infer.sh+++ b/evaluation/ml_bench/scripts/run_infer.sh@@ -8,7 +8,12 @@ COMMIT_HASH=$2SPLIT=$3AGENT=$4EVAL_LIMIT=$5+NUM_WORKERS=$6+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+ficheckout_eval_branchif [ -z "$MODEL_CONFIG" ]; then@@ -31,7 +36,7 @@ COMMAND="poetry run python evaluation/ml_bench/run_infer.py \--agent-cls $AGENT \--llm-config $MODEL_CONFIG \--max-iterations 10 \- --eval-num-workers 4 \+ --eval-num-workers $NUM_WORKERS \--eval-note $AGENT_VERSION"if [ -n "$EVAL_LIMIT" ]; thendiff --git a/evaluation/swe_bench/scripts/run_infer.sh b/evaluation/swe_bench/scripts/run_infer.shold mode 100755new mode 100644index 544c72e1da..17fde504a4--- a/evaluation/swe_bench/scripts/run_infer.sh+++ b/evaluation/swe_bench/scripts/run_infer.sh@@ -8,7 +8,12 @@ COMMIT_HASH=$2AGENT=$3EVAL_LIMIT=$4MAX_ITER=$5+NUM_WORKERS=$6+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+ficheckout_eval_branchif [ -z "$AGENT" ]; then@@ -45,7 +50,7 @@ COMMAND="poetry run python evaluation/swe_bench/run_infer.py \--llm-config $MODEL_CONFIG \--max-iterations $MAX_ITER \--max-chars 10000000 \- --eval-num-workers 8 \+ --eval-num-workers $NUM_WORKERS \--eval-note $EVAL_NOTE"if [ -n "$EVAL_LIMIT" ]; thendiff --git a/evaluation/toolqa/scripts/run_infer.sh b/evaluation/toolqa/scripts/run_infer.shindex 00d015c338..519f49c0d7 100644--- a/evaluation/toolqa/scripts/run_infer.sh+++ b/evaluation/toolqa/scripts/run_infer.sh@@ -10,7 +10,12 @@ EVAL_LIMIT=$4DATASET=$5HARDNESS=$6WOLFRAM_APPID=$7+NUM_WORKERS=$8+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+ficheckout_eval_branchif [ -z "$AGENT" ]; then@@ -51,7 +56,7 @@ COMMAND="poetry run python evaluation/toolqa/run_infer.py \--wolfram_alpha_appid $WOLFRAM_APPID\--data-split validation \--max-chars 10000000 \- --eval-num-workers 1 \+ --eval-num-workers $NUM_WORKERS \--eval-note ${AGENT_VERSION}_${LEVELS}"if [ -n "$EVAL_LIMIT" ]; thendiff --git a/evaluation/webarena/scripts/run_infer.sh b/evaluation/webarena/scripts/run_infer.shold mode 100755new mode 100644index ec6981c9e7..fc4409c380--- a/evaluation/webarena/scripts/run_infer.sh+++ b/evaluation/webarena/scripts/run_infer.sh@@ -14,7 +14,12 @@ MODEL_CONFIG=$1COMMIT_HASH=$2AGENT=$3EVAL_LIMIT=$4+NUM_WORKERS=$5+if [ -z "$NUM_WORKERS" ]; then+ NUM_WORKERS=1+ echo "Number of workers not specified, use default $NUM_WORKERS"+ficheckout_eval_branchif [ -z "$AGENT" ]; then@@ -35,6 +40,7 @@ COMMAND="poetry run python evaluation/webarena/run_infer.py \--llm-config $MODEL_CONFIG \--max-iterations 15 \--max-chars 10000000 \+ --eval-num-workers $NUM_WORKERS \--eval-note $EVAL_NOTE"if [ -n "$EVAL_LIMIT" ]; then