Upload infer.sh with huggingface_hub
Browse files
infer.sh
CHANGED
|
@@ -7,8 +7,6 @@ MAX_LENGTH=4096
|
|
| 7 |
TOP_K=1
|
| 8 |
OUTPUT_IMAGE_PATH="./results/"
|
| 9 |
FORMAT_KEY="status_action_op_sensitive"
|
| 10 |
-
INPUT_JSON="/inspire/hdd/ws-ba572160-47f8-4ca1-984e-d6bcdeb95dbb/a100-maybe/albus/ICCV_2025/CogAgent/dataset/"
|
| 11 |
-
OUTPUT_JSON="/inspire/hdd/ws-ba572160-47f8-4ca1-984e-d6bcdeb95dbb/a100-maybe/albus/ICCV_2025/CogAgent/results/json/"
|
| 12 |
|
| 13 |
# 定义执行次数
|
| 14 |
NUM_RUNS=170 # 设置执行次数
|
|
@@ -16,6 +14,8 @@ NUM_RUNS=170 # 设置执行次数
|
|
| 16 |
# 循环执行 Python 脚本多次
|
| 17 |
for i in $(seq 1 $NUM_RUNS)
|
| 18 |
do
|
|
|
|
|
|
|
| 19 |
echo "Running script, round $i..."
|
| 20 |
python cogagent_infer.py \
|
| 21 |
--model_dir "$MODEL_DIR" \
|
|
@@ -24,6 +24,6 @@ do
|
|
| 24 |
--top_k $TOP_K \
|
| 25 |
--output_image_path f"$OUTPUT_IMAGE_PATH{i}" \
|
| 26 |
--format_key "$FORMAT_KEY" \
|
| 27 |
-
--input_json "$INPUT_JSON
|
| 28 |
-
--output_json "$OUTPUT_JSON
|
| 29 |
done
|
|
|
|
| 7 |
TOP_K=1
|
| 8 |
OUTPUT_IMAGE_PATH="./results/"
|
| 9 |
FORMAT_KEY="status_action_op_sensitive"
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# 定义执行次数
|
| 12 |
NUM_RUNS=170 # 设置执行次数
|
|
|
|
| 14 |
# 循环执行 Python 脚本多次
|
| 15 |
for i in $(seq 1 $NUM_RUNS)
|
| 16 |
do
|
| 17 |
+
INPUT_JSON="/inspire/hdd/ws-ba572160-47f8-4ca1-984e-d6bcdeb95dbb/a100-maybe/albus/ICCV_2025/CogAgent/dataset/$i.json"
|
| 18 |
+
OUTPUT_JSON="/inspire/hdd/ws-ba572160-47f8-4ca1-984e-d6bcdeb95dbb/a100-maybe/albus/ICCV_2025/CogAgent/results/json/$i.json"
|
| 19 |
echo "Running script, round $i..."
|
| 20 |
python cogagent_infer.py \
|
| 21 |
--model_dir "$MODEL_DIR" \
|
|
|
|
| 24 |
--top_k $TOP_K \
|
| 25 |
--output_image_path f"$OUTPUT_IMAGE_PATH{i}" \
|
| 26 |
--format_key "$FORMAT_KEY" \
|
| 27 |
+
--input_json "$INPUT_JSON" \
|
| 28 |
+
--output_json "$OUTPUT_JSON"
|
| 29 |
done
|