summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYurenHao0426 <Blackhao0426@gmail.com>2026-08-31 18:44:29 -0500
committerYurenHao0426 <Blackhao0426@gmail.com>2026-08-31 18:44:29 -0500
commite8cf0d238779d3fec07e770a2bc6b555fdb8aba6 (patch)
tree9a0e9d0d08679f3303b65e3f85fe12f11e485f27 /scripts
parentd75a36d29aabbc15031a292caa52e565fdd7ea44 (diff)
zero-token collaborator flow: deploy-key quickstart + auto results push (PUSH_RESULTS)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GkgLsACEF6CCP7EUfA5fZe
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/run_ladder.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/run_ladder.sh b/scripts/run_ladder.sh
index 1d412a0..7402111 100755
--- a/scripts/run_ladder.sh
+++ b/scripts/run_ladder.sh
@@ -12,6 +12,8 @@
# MICRO_BS=8 per-GPU micro batch [8]
# SET="k=v k2=v2" extra --set overrides for every run (e.g. vocab=8192 seq_len=256)
# DRY=1 print the plan and exit
+# PUSH_RESULTS=0 skip the auto collect + git-push of results JSONL [on]
+# HF_UPLOAD=1 [HF_CKPT=1] also upload to a private HF repo (needs HF_TOKEN; see README)
#
# Runs are sequential (each takes the whole node), resume-safe: a finished run leaves OUT/<name>/DONE
# and is skipped on re-invocation, so the script can be re-run after interruptions.
@@ -66,8 +68,19 @@ for size in $SIZES; do
touch "$dir/DONE"
done
done
+TAG=${HF_TAG:-$(hostname)-$(date +%Y%m%d)}
+if [ "${PUSH_RESULTS:-1}" = 1 ] && [ "${DRY:-0}" != 1 ]; then
+ # zero-token default: collect the small JSONL results and push them back over this clone's git auth
+ if python scripts/collect.py --runs "$OUT" --out "results/$TAG"; then
+ git add results
+ git -c user.email=ladder@zbp -c user.name=ladder commit -m "results: $TAG" || true # nothing new is fine
+ git push || echo "!! git push failed — push manually later or send results/$TAG"
+ else
+ echo "!! collect found no finished runs — skipping push"
+ fi
+fi
if [ "${HF_UPLOAD:-0}" = 1 ]; then
- TAG=${HF_TAG:-$(hostname)-$(date +%Y%m%d)}
+ # optional direct-to-HF (needs HF_TOKEN in the environment; see README Security)
python scripts/collect.py --runs "$OUT" --out "results/$TAG"
python scripts/upload_hf.py --results "results/$TAG" ${HF_REPO:+--repo "$HF_REPO"} ${HF_CKPT:+--with-ckpt "$OUT"}
fi