xuan-luo's picture
download
raw
1.07 kB
import math
import re
import sys
from pathlib import Path
root = Path(sys.argv[1])
smoke_name = sys.argv[2] if len(sys.argv) > 2 else "smoke"
smoke = root / smoke_name
log = (smoke / "train.log").read_text()
tracker = smoke / "checkpoints/latest_checkpointed_iteration.txt"
assert tracker.read_text().strip() == "2", "smoke checkpoint is incomplete"
rows = [line for line in log.splitlines() if re.search(r"iteration\s+\d+/\s*2\s*\|", line)]
assert len(rows) >= 2, "missing smoke iterations"
for line in rows:
loss = re.search(r"lm loss:\s*(\S+)", line)
assert loss and math.isfinite(float(loss[1])), line
for field in ("skipped", "nan"):
match = re.search(r"number of " + field + r" iterations:\s*(\d+)", line)
assert match and int(match[1]) == 0, line
assert "validation loss at iteration 2" in log
assert "100872704" in log, "actual model parameter count missing/wrong"
assert "successfully saved checkpoint" in log
assert "Traceback (most recent call last)" not in log
print(f"PASS: {root.name} real 8-GPU smoke, validation, checkpoint=2")

Xet Storage Details

Size:
1.07 kB
·
Xet hash:
47c6267d80bb0e50ae244e411cb30125bc81c4855cf8ad188614d53bf749ed73

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.