stage5 resume support
Browse files- run_all.py +10 -0
run_all.py
CHANGED
|
@@ -154,6 +154,16 @@ def stage5(args):
|
|
| 154 |
(B) R = k+4 + untied stem block + dense per-iteration supervision with
|
| 155 |
hold-after-k targets f^{min(t,k)}(x) - the full fix package."""
|
| 156 |
lr = chosen_lr(args.hub_repo)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
variants = [
|
| 158 |
("rec1m4", {"arch": "rec", "depth": 1, "iters": "aligned4"}),
|
| 159 |
("rec1m4dense", {"arch": "rec", "depth": 1, "iters": "aligned4",
|
|
|
|
| 154 |
(B) R = k+4 + untied stem block + dense per-iteration supervision with
|
| 155 |
hold-after-k targets f^{min(t,k)}(x) - the full fix package."""
|
| 156 |
lr = chosen_lr(args.hub_repo)
|
| 157 |
+
# resume support: a fresh container has no local checkpoints, so pull
|
| 158 |
+
# finished ones from the Hub; the skip-if-present check below then
|
| 159 |
+
# skips them and only unfinished variants train
|
| 160 |
+
if not glob.glob("out/rec1m4*.pt"):
|
| 161 |
+
from huggingface_hub import snapshot_download
|
| 162 |
+
snapshot_download(repo_id=args.hub_repo, repo_type="model",
|
| 163 |
+
allow_patterns=["ckpts/rec1m4*.pt"],
|
| 164 |
+
local_dir="out")
|
| 165 |
+
for f in glob.glob("out/ckpts/rec1m4*.pt"):
|
| 166 |
+
os.replace(f, os.path.join("out", os.path.basename(f)))
|
| 167 |
variants = [
|
| 168 |
("rec1m4", {"arch": "rec", "depth": 1, "iters": "aligned4"}),
|
| 169 |
("rec1m4dense", {"arch": "rec", "depth": 1, "iters": "aligned4",
|