#!/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"