summaryrefslogtreecommitdiff
path: root/collaborativeagents/scripts/queue_next_run.sh
blob: 524f0e272f3cd88192713ed66742954967d4de9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Wait for current fullrun_4methods to finish, then start real-profile experiment

LOG="/workspace/personalization-user-model/collaborativeagents/results/fullrun_4methods.log"
SCRIPTS_DIR="/workspace/personalization-user-model/collaborativeagents/scripts"

echo "[$(date)] Waiting for fullrun_4methods to complete..."

while true; do
    if grep -q "EXPERIMENT COMPLETE" "$LOG" 2>/dev/null; then
        echo "[$(date)] fullrun_4methods completed!"
        break
    fi
    # Check if process died without completing
    if ! pgrep -f "fullrun_4methods" > /dev/null 2>&1; then
        if ! grep -q "EXPERIMENT COMPLETE" "$LOG" 2>/dev/null; then
            echo "[$(date)] WARNING: process died before completion. Starting next run anyway."
            break
        fi
    fi
    sleep 60
done

echo "[$(date)] Starting real-profile experiment: 4 methods x 100 profiles x 20 sessions"

cd "$SCRIPTS_DIR"
nohup python3 run_experiments.py \
    --methods vanilla,reflection,rag,rag_vector \
    --datasets math-hard \
    --n-profiles 100 \
    --n-sessions 20 \
    --max-turns 8 \
    --use-vllm \
    --vllm-agent-url http://localhost:8003/v1 \
    --vllm-user-url http://localhost:8004/v1 \
    --parallel-profiles 100 \
    --reward-mode llm_local \
    --reward-vllm-url http://localhost:8005/v1 \
    --profile-path ../data/complex_profiles_v2/profiles_200.jsonl \
    --output-dir ../results/realprofile_4methods \
    > ../results/realprofile_4methods.log 2>&1 &

echo "[$(date)] Experiment launched with PID $!"
echo "Log: /workspace/personalization-user-model/collaborativeagents/results/realprofile_4methods.log"