-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #228 from Wei-Zao/main
Add batch_evaluate.sh
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |