Download code/hf_stage.sh from ThuongBuiRVC/datariengcuathuongbui: direct link, hf CLI and curl.
- Browser
- Download file 1.41 kB
-
https://huggingface.co/datasets/ThuongBuiRVC/datariengcuathuongbui/resolve/main/code/hf_stage.sh
- Command line
-
hf download hf://datasets/ThuongBuiRVC/datariengcuathuongbui/code/hf_stage.sh
-
curl -L -o hf_stage.sh https://huggingface.co/datasets/ThuongBuiRVC/datariengcuathuongbui/resolve/main/code/hf_stage.sh
1.41 kB
| # db: staging tree for the HF dataset repo (hard links on the same HDD: no extra space, except the val clip tars). | |
| set -e | |
| ST=/mnt/10TB_HDD/nuReasoning/hf_stage | |
| V=/mnt/10TB_HDD/nuReasoning/vlr | |
| mkdir -p $ST/cache $ST/data $ST/code $ST/ckpt $ST/val_clips | |
| for s in train val train_supp val_off test test_extra; do | |
| mkdir -p $ST/cache/$s | |
| cp -l -n $V/cache/$s/*.npz $ST/cache/$s/ 2>/dev/null || true | |
| echo "$s $(ls $ST/cache/$s | wc -l)" | |
| done | |
| for f in train.pkl val.pkl train_supp.pkl val_off.pkl test.pkl test_extra.pkl crit_train.pkl crit_val.pkl crit_val_off.pkl \ | |
| crit_train_supp.pkl ego_fut_v2.pkl submission_template.json; do cp -l -n $V/data/$f $ST/data/; done | |
| cp -n /home/db/ThuongBui/localization/vlr/*.py /home/db/ThuongBui/localization/vlr/*.sh $ST/code/ 2>/dev/null || true | |
| cp -n /home/db/ThuongBui/localization/vlr/runs/joint_r1/last.pt $ST/ckpt/joint_r1_last.pt | |
| # official val clips: the files the devkit planning score reads, one tar per clip | |
| cd /mnt/10TB_HDD/nuReasoning/data_val_official | |
| ls -d */ | sed 's#/##' | xargs -P 4 -I{} sh -c '[ -s '$ST'/val_clips/{}.tar ] || tar -cf '$ST'/val_clips/{}.tar.tmp {}/metadata.json {}/map.pkl {}/ego_state {}/annotations && mv '$ST'/val_clips/{}.tar.tmp '$ST'/val_clips/{}.tar 2>/dev/null; true' | |
| echo "val_clips $(ls $ST/val_clips/*.tar | wc -l)" | |
| du -sh --apparent-size $ST/val_clips $ST/data $ST/code $ST/ckpt | cat | |
| echo STAGE_DONE | |