#!/usr/bin/env bash

set -euo pipefail

NNODES=${PET_NNODES:-1}
NODE_RANK=${PET_NODE_RANK:-0}
MASTER_ADDR=${PET_MASTER_ADDR:-"127.0.0.1"}
MASTER_PORT=${PET_MASTER_PORT:-29500}
NPROC_PER_NODE=${PET_NPROC_PER_NODE:-8}

/home/fcheng/miniconda/bin/python -m torch.distributed.run \
--nnodes="${NNODES}" \
--node_rank="${NODE_RANK}" \
--master_addr "${MASTER_ADDR}" \
--master_port "${MASTER_PORT}" \
--nproc_per_node "${NPROC_PER_NODE}" \
train_mono2d.py \
--model yolo26s.pt \
--epochs 100 \
--batch 128 \
--imgsz 768 \
--pretrained \
--exp_dir=./runs/detect/train_mono2d_20260429
