Datasets:
Download code/robohome/src/tools/rplan/run_trials.sh from RoboParty/RoboHome: direct link, hf CLI and curl.
- Browser
- Download file 1.43 kB
-
https://huggingface.co/datasets/RoboParty/RoboHome/resolve/main/code/robohome/src/tools/rplan/run_trials.sh
- Command line
-
hf download hf://datasets/RoboParty/RoboHome/code/robohome/src/tools/rplan/run_trials.sh
-
curl -L -o run_trials.sh https://huggingface.co/datasets/RoboParty/RoboHome/resolve/main/code/robohome/src/tools/rplan/run_trials.sh
1.43 kB
| # Run the real chain (build-shell, prepare, execute) on one converted RPLAN plan per kind, one after the other, on a fixed code snapshot. | |
| # usage: run_trials.sh <trial dir from pick_trials.py> <name prefix> <kind> [<kind> ...] | |
| set -u | |
| TREE=$(cd "$(dirname "$0")/../.." && pwd) | |
| resolve_path() { | |
| PYTHONPATH="$TREE${PYTHONPATH:+:$PYTHONPATH}" python3 -B -c 'import rhg_paths,sys; print(rhg_paths.resolve(sys.argv[1] or sys.argv[2]))' "$1" "$2" | |
| } | |
| H=$(resolve_path "${RHG_TRIAL_HOME:-}" '${RHG_WORKSPACE_ROOT}/hayfung') || exit 1 | |
| SNAP=$(resolve_path "${RHG_TRIAL_SNAPSHOT:-}" '${RHG_WORKSPACE_ROOT}/generic_20261101/snap_envelope_20261108_2132g') || exit 1 | |
| DRIVER=$(resolve_path "${RHG_TRIAL_DRIVER:-}" '${RHG_WORKSPACE_ROOT}/random_e2e_20261104/driver/run_random_e2e_v6.py') || exit 1 | |
| TRIALS=$1; PREFIX=$2; shift 2 | |
| for kind in "$@"; do | |
| exp=$H/validation/${PREFIX}_$kind | |
| seed=$(/usr/bin/python3 -c "import random; print(random.Random('$kind').randrange(2**31))") | |
| export RHG_RPLAN_SEEDS=$TRIALS/$kind.json | |
| /usr/bin/python3 $DRIVER setup --root $SNAP --exp $exp --seeds $seed \ | |
| --seed-origin "seed fixed by the kind name; the library holds one converted RPLAN plan ($kind), see hayfung/rplan_full" | |
| /usr/bin/python3 $DRIVER run --exp $exp > $exp.driver.log 2>&1 | |
| echo "$(date +%T) $kind finished: $(/usr/bin/python3 -c "import json;print([r['status'] for r in json.load(open('$exp/results.json'))])" 2>&1)" | |
| done | |