yang29's picture
Record CF training and evaluation implementation
f947839 verified
Raw History Blame Contribute Delete
1.26 kB
#!/usr/bin/env bash
#PBS -N cf-baseline
#PBS -q auto
#PBS -P CFP05-CF-062
#PBS -l select=1:ngpus=2:ncpus=24:mem=200GB
#PBS -l walltime=96:00:00
#PBS -j oe
#PBS -r n
set -euo pipefail
cd /nfs/home/svu/e0833524/AFD
: "${CF_METHOD:?}" "${CF_RUN_DIR:?}"
exec >> "$CF_RUN_DIR/train.log" 2>&1
export AFD_ASTROLABE_GPU=1
runtime=/hpctmp/e0833524/afd_astrolabe_b200
if [[ "$CF_METHOD" == advdmd ]]; then runtime=/hpctmp/e0833524/afd_advdmd_b200; fi
if [[ "${CF_SKIP_TRAIN:-0}" != 1 ]]; then
bash scripts/causal_baselines_b200/container.sh /usr/bin/env HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 \
"$runtime/venv/bin/python" -u -m scripts.causal_baselines_b200.train --method "$CF_METHOD" --run-dir "$CF_RUN_DIR"
fi
if [[ "${CF_SMOKE:-0}" == 1 ]]; then
bash scripts/causal_baselines_b200/container.sh /usr/bin/env HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 \
"$runtime/venv/bin/python" -u -m scripts.causal_baselines_b200.verify --method "$CF_METHOD" --run-dir "$CF_RUN_DIR"
bash scripts/causal_baselines_b200/eval.sh "$CF_RUN_DIR/evaluation/plan.json"
exec bash scripts/causal_baselines_b200/container.sh \
"$runtime/venv/bin/python" -u -m scripts.causal_baselines_b200.verify --method "$CF_METHOD" \
--run-dir "$CF_RUN_DIR" --evaluation-complete
fi