Cion-lab commited on
Commit
bc34e7d
·
verified ·
1 Parent(s): a813e5c

p4_stop_probe: pins at a813e5c7 + bounded-readback rehearsal stage / tee-prefix fix

Browse files
Files changed (1) hide show
  1. kernels/p4_stop_probe.py +9 -4
kernels/p4_stop_probe.py CHANGED
@@ -20,18 +20,18 @@
20
  # hundred steps, the save path's host/GPU copies while the card is 84 % full, and the eval forward pass.
21
  # Peak memory is asserted, not eyeballed. If it holds, the run adopts it as D-018 with a finer push cadence
22
  # as the bounded blast radius; if it does not, D-017 stands and this is the measurement that says so.
23
- import hashlib, json, os, shutil, signal, subprocess, sys, threading, time
24
 
25
  os.chdir("/kaggle/working")
26
  sys.path.insert(0, "/kaggle/working")
27
- REV = "7570b7b264f82a536a7a0f8f3e45241dca10d883"
28
  WANT = {
29
  "ounce100m_credentials.py": ("ounce100m_credentials.py",
30
  "6525f62f03f2d73650a1eb4f70fcb52d1194caad4ca88b2d8bd8fd54f88339b6"),
31
  "shard_dataset.py": ("train/shard_dataset.py",
32
  "f35653bf4c8f2cfe7bb0c2c7835e308505fb5a84b4eb002d0f82f2cada768ca6"),
33
  "hubckpt.py": ("train/hubckpt.py",
34
- "568c31b300906cb8d78a59ef890baa9731b18e064e3d69b0eaea4b45c546f23e"),
35
  "train_ounce100m.py": ("train/train_ounce100m.py",
36
  "744259c7519e5a12c2d2bf4dca534fa39f7ddb7e6689e1a5a9e0925bfaa640aa"),
37
  }
@@ -70,6 +70,11 @@ TLOG = "/kaggle/working/tlogs"
70
  # watching stays live *and* each rank's traceback is on disk for diag() below.
71
  TORCHRUN = ["torchrun", "--nproc_per_node=2", "--redirects", "3", "--tee", "3", "--log-dir", TLOG]
72
  TPS = 262144 # the run's real step shape, in tokens
 
 
 
 
 
73
  if MODE == "smoke":
74
  STEPS, PUSH_EVERY, STOP1, VAL = 20, 10, 10, 200000
75
  T_LEG1, T_LEG2, T_FRESH = 1200, 900, 1500
@@ -119,7 +124,7 @@ def run(argv, label, timeout):
119
  keep, lines = [], []
120
  try:
121
  for line in p.stdout:
122
- line = line.rstrip("\n")
123
  lines.append(line)
124
  if line.startswith(("CKPT ", "RUN_JSON ", "resume from", "auto-resume", "precision:",
125
  "params:", "mix:", "checkpoint hub target", "segment boundary",
 
20
  # hundred steps, the save path's host/GPU copies while the card is 84 % full, and the eval forward pass.
21
  # Peak memory is asserted, not eyeballed. If it holds, the run adopts it as D-018 with a finer push cadence
22
  # as the bounded blast radius; if it does not, D-017 stands and this is the measurement that says so.
23
+ import hashlib, json, os, re, shutil, signal, subprocess, sys, threading, time
24
 
25
  os.chdir("/kaggle/working")
26
  sys.path.insert(0, "/kaggle/working")
27
+ REV = "a813e5c7fb7539a0586756c76b95f7520934f7a0"
28
  WANT = {
29
  "ounce100m_credentials.py": ("ounce100m_credentials.py",
30
  "6525f62f03f2d73650a1eb4f70fcb52d1194caad4ca88b2d8bd8fd54f88339b6"),
31
  "shard_dataset.py": ("train/shard_dataset.py",
32
  "f35653bf4c8f2cfe7bb0c2c7835e308505fb5a84b4eb002d0f82f2cada768ca6"),
33
  "hubckpt.py": ("train/hubckpt.py",
34
+ "a21de427b9c7586d3cc104e80d230a085d00907829fe1148d0b1ddbec9f4d20a"),
35
  "train_ounce100m.py": ("train/train_ounce100m.py",
36
  "744259c7519e5a12c2d2bf4dca534fa39f7ddb7e6689e1a5a9e0925bfaa640aa"),
37
  }
 
70
  # watching stays live *and* each rank's traceback is on disk for diag() below.
71
  TORCHRUN = ["torchrun", "--nproc_per_node=2", "--redirects", "3", "--tee", "3", "--log-dir", TLOG]
72
  TPS = 262144 # the run's real step shape, in tokens
73
+ # `--tee` prefixes every forwarded line with the worker name, and this file parses those lines: v5's
74
+ # harvest() found no `RUN_JSON ` because the trainer's rank-0 output arrived as
75
+ # "[default0]: RUN_JSON {...}", so every step/token/param check reported false on a leg that had actually
76
+ # passed, and the failure looked like a trainer bug rather than a probe bug. Strip it once, on the way in.
77
+ TEE = re.compile(r"^\[(?:default|rank|worker)\d*\]:\s*")
78
  if MODE == "smoke":
79
  STEPS, PUSH_EVERY, STOP1, VAL = 20, 10, 10, 200000
80
  T_LEG1, T_LEG2, T_FRESH = 1200, 900, 1500
 
124
  keep, lines = [], []
125
  try:
126
  for line in p.stdout:
127
+ line = TEE.sub("", line.rstrip("\n"), count=1)
128
  lines.append(line)
129
  if line.startswith(("CKPT ", "RUN_JSON ", "resume from", "auto-resume", "precision:",
130
  "params:", "mix:", "checkpoint hub target", "segment boundary",