Download code/1028_run/tasks/train_only.sh from yqi19/dagger: direct link, hf CLI and curl.
- Browser
- Download file 1.63 kB
-
https://huggingface.co/datasets/yqi19/dagger/resolve/main/code/1028_run/tasks/train_only.sh
- Command line
-
hf download hf://datasets/yqi19/dagger/code/1028_run/tasks/train_only.sh
-
curl -L -o train_only.sh https://huggingface.co/datasets/yqi19/dagger/resolve/main/code/1028_run/tasks/train_only.sh
1.63 kB
| set -uo pipefail | |
| ROOT=/lustre/fsw/portfolios/nvr/users/jtremblay/yu | |
| RUN=$ROOT/1028_run; TASKS=$ROOT/1027_sim_tasks | |
| V5CODE=$TASKS/share_v5_sim2real_20260929/code | |
| CONDA=$ROOT/miniconda3; UPY=$CONDA/envs/ur5dp/bin/python | |
| TASK=${TASK:-battery}; NAME=${TASK}_v1 | |
| log() { echo "== $(date '+%F %T') [$TASK] $*"; } | |
| FINAL=$RUN/data/${NAME}_1028 | |
| source $CONDA/etc/profile.d/conda.sh | |
| kept=$($UPY -c "import json; d=json.load(open('$FINAL/collect_meta.json')); print(d['n_kept'])" 2>/dev/null || echo 0) | |
| log "Training DP ($kept demos) with AMP + batch_size=256 + num_workers=16" | |
| cd $V5CODE/ur5_lab_code && export PYTHONPATH=src:. | |
| rm -f $V5CODE/train_runs/${NAME}_1028_aug_s0/logs.json.txt # clear old logs to allow fresh start | |
| $UPY train.py --config-name=train_baseline_diffusion_unet task=sim_baseline \ | |
| task_name=${NAME}_1028 dataset_path=$FINAL n_demo=$kept \ | |
| training.device=cuda:0 training.seed=0 training.num_epochs=130 training.checkpoint_every=129 \ | |
| checkpoint.topk.k=0 training.resume=True checkpoint.save_last_ckpt=True \ | |
| +training.use_amp=True \ | |
| dataloader.batch_size=256 dataloader.num_workers=16 \ | |
| logging.mode=offline \ | |
| "policy._target_=algorithms.policy.diffusion_unet_baseline_aug_policy.DiffusionUnetBaselineAugPolicy" \ | |
| +policy.cam1_dropout=0.1 +policy.cam1_aug_p=0.5 +policy.cam1_erase_p=0.3 +policy.cam0_aug_p=0.3 \ | |
| "hydra.run.dir=$V5CODE/train_runs/${NAME}_1028_aug_s0" \ | |
| 2>&1 | tee $RUN/logs/${NAME}_1028_train.log | |
| rc=$?; log "Train exit $rc" | |
| [ $rc -eq 0 ] && log "DONE: $V5CODE/train_runs/${NAME}_1028_aug_s0/checkpoints/" || { log "TRAIN FAILED"; exit 1; } | |