PWM / PWM_code /policy_wm_eval /run_server.sh
hchen657Naza's picture
Add files using upload-large-folder tool
dd253d4 verified
Raw History Blame Contribute Delete
995 Bytes
#!/usr/bin/env bash
# Launch an OSCAR WM HTTP server for the eval.
# LORA="finetune/ckpt_6task_lora25/lora_step16000.pt" # finetuned chunk25 skeleton WM
# LORA="" # base OSCAR-2B (no LoRA)
#
# Usage:
# GPU=6 PORT=8819 MASTER_PORT=29618 \
# LORA=finetune/ckpt_6task_lora25/lora_step16000.pt bash run_server.sh
set -euo pipefail
OSCAR=/root/pwm_local/oscar-public
GPU="${GPU:-6}"
PORT="${PORT:-8819}"
MASTER_PORT="${MASTER_PORT:-29618}"
LORA="${LORA:-finetune/ckpt_6task_lora25/lora_step16000.pt}"
LOG="${LOG:-/tmp/oscar_server_${PORT}.log}"
cd "$OSCAR"
CUDA_VISIBLE_DEVICES="$GPU" PYTHONPATH=. HF_HUB_OFFLINE=1 \
.venv/bin/torchrun --nproc_per_node=1 --master_port="$MASTER_PORT" \
/root/pwm_local/PWM_code/policy_rl/rl_sim/act_wm_residual_oscar/workers/wm/oscar_wm_server.py \
--lora "$LORA" --lora_r 16 --lora_alpha 32 --port "$PORT" > "$LOG" 2>&1 &
echo "oscar server pid $! -> port $PORT gpu $GPU log $LOG (lora=${LORA:-BASE})"