summaryrefslogtreecommitdiff
path: root/collaborativeagents/slurm/rerun_reflection.sbatch
diff options
context:
space:
mode:
authorYurenHao0426 <blackhao0426@gmail.com>2026-01-27 09:57:37 -0600
committerYurenHao0426 <blackhao0426@gmail.com>2026-01-27 09:57:37 -0600
commitdc801c07cf38b0c495686463e6ca6f871a64440e (patch)
tree599f03114775921dbc472403c701f4a3a8ea188a /collaborativeagents/slurm/rerun_reflection.sbatch
parente43b3f8aa36c198b95c1e46bea2eaf3893b13dc3 (diff)
Add collaborativeagents module and update gitignore
- Add collaborativeagents subproject with adapters, agents, and evaluation modules - Update .gitignore to exclude large binary files (.whl, .tar), wandb logs, and results Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'collaborativeagents/slurm/rerun_reflection.sbatch')
-rw-r--r--collaborativeagents/slurm/rerun_reflection.sbatch83
1 files changed, 83 insertions, 0 deletions
diff --git a/collaborativeagents/slurm/rerun_reflection.sbatch b/collaborativeagents/slurm/rerun_reflection.sbatch
new file mode 100644
index 0000000..aac2ed3
--- /dev/null
+++ b/collaborativeagents/slurm/rerun_reflection.sbatch
@@ -0,0 +1,83 @@
+#!/bin/bash
+#SBATCH --job-name=refl_fix
+#SBATCH --account=bfqt-delta-gpu
+#SBATCH --partition=gpuH200x8-interactive
+#SBATCH --gres=gpu:4
+#SBATCH --time=01:00:00
+#SBATCH --mem=200G
+#SBATCH --cpus-per-task=32
+#SBATCH --output=%x-%j.out
+#SBATCH --error=%x-%j.err
+
+cd /projects/bfqt/users/yurenh2/ml-projects/personalization-user-model
+
+source ~/miniforge3/etc/profile.d/conda.sh
+conda activate eval
+
+export HF_HOME=/projects/bfqt/users/yurenh2/hf_cache/huggingface
+export PYTHONPATH=/projects/bfqt/users/yurenh2/ml-projects/personalization-user-model:$PYTHONPATH
+
+PROFILE_PATH="collaborativeagents/data/complex_profiles_v2/profiles_200.jsonl"
+AGENT_MODEL="/projects/bfqt/users/yurenh2/ml-projects/personalization-user-model/models/llama-3.1-8b-instruct"
+USER_MODEL="meta-llama/Llama-3.1-70B-Instruct"
+
+echo "=== Starting vLLM servers ==="
+date
+
+# User simulator on GPUs 0,1 (70B)
+CUDA_VISIBLE_DEVICES=0,1 python -m vllm.entrypoints.openai.api_server \
+ --model $USER_MODEL \
+ --port 8004 --tensor-parallel-size 2 --gpu-memory-utilization 0.90 \
+ --max-model-len 16384 --dtype bfloat16 --download-dir $HF_HOME &
+
+# Agent on GPUs 2,3 (8B)
+CUDA_VISIBLE_DEVICES=2,3 python -m vllm.entrypoints.openai.api_server \
+ --model $AGENT_MODEL \
+ --port 8003 --tensor-parallel-size 2 --gpu-memory-utilization 0.90 \
+ --max-model-len 16384 --dtype bfloat16 &
+
+# Wait for servers
+echo "Waiting for vLLM servers..."
+for i in {1..200}; do
+ if curl -s http://localhost:8004/health > /dev/null 2>&1; then
+ echo "User simulator (8004) ready after $((i*5)) seconds"
+ break
+ fi
+ sleep 5
+done
+for i in {1..60}; do
+ if curl -s http://localhost:8003/health > /dev/null 2>&1; then
+ echo "Agent (8003) ready after $((i*5)) seconds"
+ break
+ fi
+ sleep 5
+done
+echo "Both vLLM servers ready"
+sleep 10
+
+# Run profile 1 (user_14b429db - had empty response bug)
+echo "=== Running profile 1 (user_14b429db) ==="
+python collaborativeagents/scripts/run_experiments.py \
+ --methods reflection \
+ --n-profiles 5 \
+ --n-sessions 15 \
+ --start-profile 1 --end-profile 2 \
+ --output-dir results/reflection_rerun \
+ --profile-path $PROFILE_PATH \
+ --datasets math-hard \
+ --use-vllm --parallel-profiles 1 --no-batch-processing
+
+# Run profile 4 (user_a0a3ed44 - was missing)
+echo "=== Running profile 4 (user_a0a3ed44) ==="
+python collaborativeagents/scripts/run_experiments.py \
+ --methods reflection \
+ --n-profiles 5 \
+ --n-sessions 15 \
+ --start-profile 4 --end-profile 5 \
+ --output-dir results/reflection_rerun \
+ --profile-path $PROFILE_PATH \
+ --datasets math-hard \
+ --use-vllm --parallel-profiles 1 --no-batch-processing
+
+pkill -f "vllm.entrypoints" 2>/dev/null || true
+echo "Done!"