diff options
Diffstat (limited to 'collaborativeagents/scripts/queue_rag_rewrite_vector.sh')
| -rwxr-xr-x | collaborativeagents/scripts/queue_rag_rewrite_vector.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/collaborativeagents/scripts/queue_rag_rewrite_vector.sh b/collaborativeagents/scripts/queue_rag_rewrite_vector.sh new file mode 100755 index 0000000..480e3ac --- /dev/null +++ b/collaborativeagents/scripts/queue_rag_rewrite_vector.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# 等待 rag_rewrite_60s 完成后启动 rag_rewrite_vector 测试 + +echo "等待 rag_rewrite_60s 完成..." + +while true; do + CKPT=$(ls collaborativeagents/results/rag_rewrite_60s/*/rag_rewrite/checkpoint.json 2>/dev/null | head -1) + if [ -n "$CKPT" ]; then + PROGRESS=$(cat "$CKPT" | python3 -c " +import json, sys +data = json.load(sys.stdin) +total = sum(data['sessions_per_profile'].values()) +print(total) +" 2>/dev/null) + + if [ "$PROGRESS" = "3600" ]; then + echo "$(date '+%H:%M:%S') rag_rewrite_60s 已完成" + break + fi + echo "$(date '+%H:%M:%S') rag_rewrite_60s 进度: $PROGRESS/3600" + else + echo "$(date '+%H:%M:%S') 等待rag_rewrite_60s启动..." + fi + sleep 120 +done + +echo "启动 rag_rewrite_vector_60s..." + +nohup python collaborativeagents/scripts/run_experiments.py \ + --methods rag_rewrite_vector \ + --datasets math-hard,math-500,bigcodebench \ + --n-profiles 60 \ + --n-sessions 60 \ + --max-turns 10 \ + --use-vllm \ + --vllm-agent-url http://localhost:8003/v1 \ + --vllm-user-url http://localhost:8004/v1 \ + --use-batch-processing \ + --batch-size 4 \ + --parallel-profiles 20 \ + --profile-path collaborativeagents/data/complex_profiles_v2/profiles_200.jsonl \ + --output-dir collaborativeagents/results/rag_rewrite_vector_60s \ + > collaborativeagents/results/rag_rewrite_vector_60s.log 2>&1 & + +echo "rag_rewrite_vector_60s 已启动,PID: $!" |
