File size: 1,558 Bytes
fc95770
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
# 1116 TODO: VAL-set inference of one pushT / rope run at epochs 14 and 15 (epoch_014.pt, epoch_015.pt), 4 GPUs.
# Uses the val cases of that run's task (eval/cases/{pusht,rope}_val_cases.json, from the val split of the run's own
# split file), writes runs/<run_name>/val_epoch_01{4,5}/summary.md and uploads results/<run_name>/val_epoch_01{4,5}/
# (+ checkpoints/<run_name>/epoch_01{4,5}.pt for the TODO runs) to the HF repo.
#   bash scripts/infer_val.sh configs/nano_action_causal_pusht_v1.yaml                   # parent (shipped ckpts) -- run first
#   bash scripts/infer_val.sh configs/nano_action_causal_pusht_sensoronly_v1.yaml
#   bash scripts/infer_val.sh configs/nano_action_causal_pusht_sensoronly_noforce_v1.yaml
#   EPOCHS="14" bash scripts/infer_val.sh <config> --no-upload                          # one epoch, no upload
# Works as soon as runs/<run_name>/epoch_014.pt exists (training may still be running on other GPUs).
# Resumable: re-run the same command, finished cases are skipped.
set -euo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
source "${ACTS_REPO:-$HERE}/env.sh"
cd "$ACTS_REPO"
CONFIG="${1:?usage: infer_val.sh configs/nano_action_causal_<pusht|rope>_<variant>.yaml [--no-upload]}"; shift || true
case "$CONFIG" in
  *pusht*|*rope*) ;;
  *) echo "infer_val.sh: val cases exist only for pushT and rope configs, got $CONFIG" >&2; exit 1 ;;
esac
for E in ${EPOCHS:-14 15}; do
  "$PYTHON_BIN" -u scripts/todo_eval_upload.py "$CONFIG" --split val --epoch "$E" --ngpu "${NGPU:-4}" "$@"
done