Skip to content

Commit

Permalink
Merge pull request #228 from Wei-Zao/main
Browse files Browse the repository at this point in the history
Add batch_evaluate.sh
  • Loading branch information
tricktreat authored Jan 5, 2024
2 parents 1fdbbf9 + 1b23da6 commit 9a6adb0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions taskbench/batch_evaluate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
set -x
set -e

export CUDA_VISIBLE_DEVICES=0

data_dir=$1
prediction_dir=$2

if [[ $data_dir == *"dailylifeapis"* ]]; then
dependency_type="temporal"
else
dependency_type="resource"
fi

for file in $data_dir/$prediction_dir/*.json
do
llm=$(basename $file .json)
# replace prediction_dir's "predictions" with "metrics"
metrics=$(echo $prediction_dir | sed 's/predictions/metrics/g')
if [ -f $data_dir/$metrics/${llm}_splits_all_tools_all_metric_all.json ] && [ -s $data_dir/$metrics/${llm}_splits_all_tools_all_metric_all.json ];
then
continue
fi
echo $llm
python evaluate.py --data_dir $data_dir --prediction_dir $prediction_dir --llm $llm --splits all --n_tools all --mode add --dependency_type $dependency_type -m all
done

0 comments on commit 9a6adb0

Please sign in to comment.