Download code/forever.sh from yang29/afd-causal-forcing-baselines-vbench: direct link, hf CLI and curl.
- Browser
- Download file 748 Bytes
-
https://huggingface.co/datasets/yang29/afd-causal-forcing-baselines-vbench/resolve/main/code/forever.sh
- Command line
-
hf download hf://datasets/yang29/afd-causal-forcing-baselines-vbench/code/forever.sh
-
curl -L -o forever.sh https://huggingface.co/datasets/yang29/afd-causal-forcing-baselines-vbench/resolve/main/code/forever.sh
748 Bytes
| set -uo pipefail | |
| cd /nfs/home/svu/e0833524/AFD | |
| mode="${1:?controller, publish or archive}" | |
| exec 9>"reports/causal-$mode.lock" | |
| flock 9 | |
| trap 'exit 0' INT TERM HUP | |
| while true; do | |
| case "$mode" in | |
| controller) python3 -u -m scripts.causal_baselines_b200.controller 9>&- ;; | |
| publish) bash scripts/causal_baselines_b200/hub.sh -u -m scripts.causal_baselines_b200.publish 9>&- ;; | |
| archive) bash scripts/causal_baselines_b200/hub.sh -u -m scripts.causal_baselines_b200.archive --checkpoints --videos 9>&- ;; | |
| *) exit 2 ;; | |
| esac | |
| result=$? | |
| printf '%s process exited %s; restarting independently of the terminal\n' "$mode" "$result" | |
| if [[ "$mode" == archive && "$result" == 0 ]]; then sleep 600; else sleep 30; fi | |
| done | |