tools/acceptance/: Dockerfile (pi 0.85.1 image), run-task.sh / run-all.sh / judge.sh / pretty.py, tasks md-toc, kvstore, bugfix (seeded), minesweeper with hidden tests / black-box judges, models.tsv, README. Runs go to runs/ (ignored); curated results land under bench/unbiased/ when the campaign closes. frontend/tests/acceptance-real-engine.sh: PLAN.md step 13 (c): sampled checks, seeded repeat, tool call, decode and prompt-reading speed against an expected figure with a 15 % band. frontend/strata_context.cpp: the vocabulary-only load is retried with general.architecture overridden to "llama" when llama.cpp does not know the file's architecture; GLM 5.3 Flash's file says glm5-next (neurall's fork) and the front end refused to start (USTRAT-6). Verified on the 2x B200 pod: GLM starts, template renders, answers. tools/pod/README.md: pod-to-pod tree copy (90 s against hours from the laptop), bringup must wait for the tree. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
16 lines
580 B
Python
16 lines
580 B
Python
import re
|
|
|
|
_UNIT = {"h": 3600, "m": 60, "s": 1}
|
|
|
|
def parse(text):
|
|
"""Seconds in a duration written like "1h30m", "45m", "90s", "2h", "1h2m3s" (units in that order, each at
|
|
most once, at least one present, no spaces). Raises ValueError on anything else."""
|
|
m = re.fullmatch(r"(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?", text or "")
|
|
if not m or not any(m.groups()):
|
|
raise ValueError(f"not a duration: {text!r}")
|
|
total = 0
|
|
for value, unit in zip(m.groups(), "hms"):
|
|
if value is not None:
|
|
total += int(value) + _UNIT[unit]
|
|
return total
|