File size: 1,379 Bytes
465d9ba | 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 45 46 47 48 49 50 51 | #!/usr/bin/bash
set -x
umask 007
NGPU=${NGPU:-"8"}
MASTER_PORT=${MASTER_PORT:-"29501"}
PORT=${PORT:-"1106"}
LOG_RANK=${LOG_RANK:-"0"}
TORCHFT_LIGHTHOUSE=${TORCHFT_LIGHTHOUSE:-"http://localhost:29510"}
CONFIG_NAME=${CONFIG_NAME:-"robotwin_pretrain"}
overrides=""
if [ $# -ne 0 ]; then
overrides="$*"
fi
export TMPDIR=/vepfs-mlp2/c20250502/haoce/szh/lingbot-va/tmp
export TEMP=$TMPDIR
export TMP=$TMPDIR
mkdir -p "$TMPDIR"
export TORCHINDUCTOR_CACHE_DIR=/vepfs-mlp2/c20250502/haoce/szh/lingbot-va/tmp/torchinductor_cache
mkdir -p "$TORCHINDUCTOR_CACHE_DIR"
export TRITON_CACHE_DIR=/vepfs-mlp2/c20250502/haoce/szh/lingbot-va/tmp/triton_cache
mkdir -p "$TRITON_CACHE_DIR"
export WANDB_API_KEY="705019b40922ce96942fbdca07c2b22ebc3891fe"
export WANDB_BASE_URL="https://api.wandb.ai"
export WANDB_TEAM_NAME="screatorx"
export WANDB_PROJECT="lingbot-va-pretrain"
## node setting
num_gpu=${NGPU}
master_port=${MASTER_PORT}
log_rank=${LOG_RANK}
torchft_lighthouse=${TORCHFT_LIGHTHOUSE}
config_name=${CONFIG_NAME}
## cmd setting
export TOKENIZERS_PARALLELISM=false
PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True" TORCHFT_LIGHTHOUSE=${torchft_lighthouse} \
python -m torch.distributed.run \
--nproc_per_node=${num_gpu} \
--local-ranks-filter=${log_rank} \
--master_port ${master_port} \
--tee 3 \
-m wan_va.train --config-name ${config_name} $overrides
|