mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-05 12:24:28 +01:00
check-pins: the Qwen4, OCR and Transcribe pins, and every pin an installer makes is read
check-pins.sh read none of the Qwen4 35B-A3B lane's pins (its checkpoint, its DFlash2 draft, its image), nor the OCR lane's model and image, nor the NVIDIA Nemotron Transcribe lane's image: a revision or a digest removed upstream went unseen by the daily watch. It checks them now, the OCR model's weights and tokenizer by the sha256 its installer pins, the OCR image tied to the 27B lane's. A test fails when an installer pins a digest or a 40-hex revision this script does not read. (Code review of v1.62.0.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7e05c9a77f
commit
0939d84a2d
2 files changed
+55
-4
No files matched your search
+22
-1
@@ -82,7 +82,7 @@ uline="$(grep -E '^FLASH_UNSLOTH_(REPO|REV|PART[1-4]|IQ3_PART[1-4]|DRAFT_REPO|DR
|
||||
eval "$uline"
|
||||
# The NVIDIA Nemotron Transcribe lane's: mradermacher's GGUF at its revision, its Q8_0 and its projector each by its sha256
|
||||
# (PATH=SHA256:SIZE); its image is the Unsloth GGUF lane's, by the same digest, checked below.
|
||||
tline="$(grep -E '^TRANSCRIBE_(REPO|REV|FILE|MMPROJ)=' "$REPO_DIR/install-transcribe.sh")"
|
||||
tline="$(grep -E '^TRANSCRIBE_(REPO|REV|FILE|MMPROJ|IMAGE)=' "$REPO_DIR/install-transcribe.sh")"
|
||||
eval "$tline"
|
||||
# The Liquid AI LFM2.5 24B-A2B lane's: Liquid AI's FP8 and its DSpark draft (its image is the 27B lane's,
|
||||
# tied to it in the Images section).
|
||||
@@ -94,6 +94,14 @@ eval "$l3line"
|
||||
# The Inkling 2 Mini lane's: Thinking Machines' checkpoint and SGLang's inkling-2-mini image, pulled as published.
|
||||
iline="$(grep -E '^INKLING_(REPO|REV|IMAGE)=' "$REPO_DIR/install-inkling.sh")"
|
||||
eval "$iline"
|
||||
# The Qwen4 35B-A3B lane's: RadixArk's NVFP4 and its DFlash2 draft, and SGLang's qwen4 image, pulled as published.
|
||||
qline="$(grep -E '^QWEN4_35B_(REPO|REV|DRAFT_REPO|DRAFT_REV|IMAGE)=' "$REPO_DIR/install-qwen4-35b.sh")"
|
||||
eval "$qline"
|
||||
# The OCR lane's: ATH-MaaS's OvisOCR3 at its revision, its weights and its tokenizer by the sha256 install-ocr.sh pins in
|
||||
# OCR_FILES_PINNED (an array: its two LFS files read off it), and its image, the 27B lane's, tied to it with the images below.
|
||||
oline="$(grep -E '^OCR_(MODEL|REV|IMAGE)=' "$REPO_DIR/install-ocr.sh")"
|
||||
eval "$oline"
|
||||
OCR_LFS="$(sed -n '/^OCR_FILES_PINNED=(/,/^)/p' "$REPO_DIR/install-ocr.sh" | grep -oE '"(model\.safetensors|tokenizer\.json)=[0-9a-f]{64}:[0-9]+"' | tr -d '"')"
|
||||
# The embeddings lane's: Perplexity's model at its revision, its weights and its tokenizer by the LFS pointer's sha256, the way
|
||||
# the Unsloth GGUF lane's parts are checked. Its image is the 27B lane's, checked to be it with the images below.
|
||||
eline="$(grep -E '^EMBED_(MODEL|REV|IMAGE|FILE|TOKENIZER)=' "$REPO_DIR/install-embeddings.sh")"
|
||||
@@ -507,6 +515,15 @@ echo "Liquid AI LFM3 lane"
|
||||
check_model lfm3 "$LFM3_REPO" "$LFM3_REV"
|
||||
echo "Inkling 2 Mini lane"
|
||||
check_model inkling "$INKLING_REPO" "$INKLING_REV"
|
||||
echo "Qwen4 35B-A3B lane"
|
||||
check_model qwen4-35b "$QWEN4_35B_REPO" "$QWEN4_35B_REV"
|
||||
check_model qwen4-35b-draft "$QWEN4_35B_DRAFT_REPO" "$QWEN4_35B_DRAFT_REV"
|
||||
echo "OCR lane"
|
||||
for opin in $OCR_LFS; do # model.safetensors -> ocr, tokenizer.json -> ocr-tokenizer
|
||||
opath="${opin%%=*}"; osha="${opin##*=}"; osha="${osha%%:*}"; olabel=ocr
|
||||
[ "$opath" = model.safetensors ] || olabel="ocr-${opath%%.*}"
|
||||
check_model "$olabel" "$OCR_MODEL" "$OCR_REV" "$opath" "$osha"
|
||||
done
|
||||
echo "Embeddings lane"
|
||||
for epin in "$EMBED_FILE" "$EMBED_TOKENIZER"; do # model.safetensors -> embed, tokenizer.json -> embed-tokenizer
|
||||
epath="${epin%%=*}"; esha="${epin##*=}"; esha="${esha%%:*}"; elabel=embed
|
||||
@@ -543,6 +560,8 @@ check_same_image lfm25-image "$LFM25_IMAGE" "$IMAGE"
|
||||
# The two embeddings lanes run on its torch, the same way.
|
||||
check_same_image embed-image "$EMBED_IMAGE" "$IMAGE"
|
||||
check_same_image clipstral-image "$CLIPSTRAL_IMAGE" "$IMAGE"
|
||||
# And the OCR lane serves in it, its drawing containers too (docs/ocr-lane.md).
|
||||
check_same_image ocr-image "$OCR_IMAGE" "$IMAGE"
|
||||
check_image flash-base "$FLASH_IMAGE"
|
||||
check_image kolibri-base "$KOLIBRI_BASE_IMAGE"
|
||||
check_image nemotron-base "$NEMOTRON_BASE_IMAGE"
|
||||
@@ -550,6 +569,8 @@ check_image flash-local "$FLASH_LOCAL_IMAGE"
|
||||
check_image flash-unsloth "$FLASH_UNSLOTH_IMAGE"
|
||||
check_image lfm3 "$LFM3_IMAGE"
|
||||
check_image inkling "$INKLING_IMAGE"
|
||||
check_image qwen4-35b-image "$QWEN4_35B_IMAGE"
|
||||
check_image transcribe-image "$TRANSCRIBE_IMAGE"
|
||||
|
||||
echo
|
||||
if [ "$FAIL" -eq 0 ]; then
|
||||
|
||||
@@ -64,13 +64,17 @@ FLOCAL_MTP = {pin(FLOCAL, "FLASH_LOCAL_MTP_REPO") + ":" + pin(FLOCAL, "FLASH_LOC
|
||||
# the NVIDIA Nemotron Transcribe lane's GGUF and its projector, pinned the same way, each by a variable of its own
|
||||
TRANSCRIBE = dict((path.rsplit("/", 1)[-1], sha) for path, sha in re.findall(
|
||||
r'^TRANSCRIBE_(?:FILE|MMPROJ)="([^"=]+)=([0-9a-f]{64}):\d+"', (REPO / "install-transcribe.sh").read_text(), re.M))
|
||||
# the OCR lane's weights and tokenizer, pinned by their sha256 in install-ocr.sh's OCR_FILES_PINNED, which the pointer names
|
||||
OCR = (REPO / "install-ocr.sh").read_text()
|
||||
OCR_LFS = {f"{pin(OCR, 'OCR_MODEL')}:{name}": sha
|
||||
for name, sha in re.findall(r'^\s+"(model\.safetensors|tokenizer\.json)=([0-9a-f]{64}):\d+"', OCR, re.M)}
|
||||
# the MiniMax-H3-Image lane's FlashInfer wheels, each fetched from FlashInfer's release by its name and sha256
|
||||
H3 = (REPO / "install-image-h3.sh").read_text()
|
||||
# and PyPI publishes the very wheel files the Kolibri and Nemotron builds download, by URL and sha256
|
||||
UPSTREAM = {
|
||||
"lfs": {**dict(re.findall(r'(?:ASR|MMPROJ)_FILE="([^"]+)"; (?:ASR|MMPROJ)_SHA="([0-9a-f]{64})"', SPEECH)), **UNSLOTH,
|
||||
**TRANSCRIBE, **FLOCAL_MTP, **{f"{EMBED_MODEL}:{name}": sha for name, sha in EMBED_FILES.items()},
|
||||
**{f"{CLIPSTRAL_MODEL}:{name}": sha for name, sha in CLIPSTRAL_FILES.items()}},
|
||||
**{f"{CLIPSTRAL_MODEL}:{name}": sha for name, sha in CLIPSTRAL_FILES.items()}, **OCR_LFS},
|
||||
"assets": {KOKORO_REPO: [{"name": f, "digest": None} for f in KOKORO_FILES],
|
||||
"flashinfer-ai/flashinfer": [{"name": pin(H3, f"FLASHINFER_{k}_FILE"), "digest": "sha256:" + pin(H3, f"FLASHINFER_{k}_SHA256")}
|
||||
for k in ("CUBIN", "JIT")]},
|
||||
@@ -212,7 +216,7 @@ class TheCheckPins(PinsBase):
|
||||
rc, out = self.run_pins(None, "hf_secretvalue123")
|
||||
self.assertEqual(rc, 0, out)
|
||||
hf = [c for c in self.calls() if c["url"].startswith("https://huggingface.co/")]
|
||||
self.assertEqual(len(hf), 49, hf) # eleven checkpoints, the diffusion lanes' three, the MiniMax-H3-Image lane's two (its checkpoint and its text encoder), the video Turbo adapter, Kolibri's two, each Nemotron lane's two (the model and its drafter), the Qwen3.8 Flash-Next FP4-Local lane's two (its checkpoint and diffbot's MTP head), the Ornith lane's one, the speech lane's four GGUF (two recognizers, each a model and its projector) and the Unsloth GGUF lane's nine (the four parts of each of its two targets and its draft), the NVIDIA Nemotron Transcribe lane's two (its GGUF and its projector), the Liquid AI LFM2.5 24B-A2B lane's two (its checkpoint and its draft), the Liquid AI LFM3 lane's one, the DaisyRose 27B's one, the Inkling 2 Mini lane's one and the two embeddings lanes' two each (its weights and its tokenizer)
|
||||
self.assertEqual(len(hf), 53, hf) # eleven checkpoints, the diffusion lanes' three, the MiniMax-H3-Image lane's two (its checkpoint and its text encoder), the video Turbo adapter, Kolibri's two, each Nemotron lane's two (the model and its drafter), the Qwen3.8 Flash-Next FP4-Local lane's two (its checkpoint and diffbot's MTP head), the Ornith lane's one, the speech lane's four GGUF (two recognizers, each a model and its projector) and the Unsloth GGUF lane's nine (the four parts of each of its two targets and its draft), the NVIDIA Nemotron Transcribe lane's two (its GGUF and its projector), the Liquid AI LFM2.5 24B-A2B lane's two (its checkpoint and its draft), the Liquid AI LFM3 lane's one, the DaisyRose 27B's one, the Inkling 2 Mini lane's one, the Qwen4 35B-A3B lane's two (its checkpoint and its draft), the two embeddings lanes' two each (its weights and its tokenizer) and the OCR lane's two (its weights and its tokenizer)
|
||||
for c in hf:
|
||||
self.assertIn("Authorization: Bearer hf_secretvalue123", c["stdin"], c)
|
||||
self.assertFalse(any("hf_secretvalue123" in a for a in c["argv"]), c["argv"])
|
||||
@@ -327,6 +331,32 @@ class ThePinsOutsideThePinBlock(PinsBase):
|
||||
self.assertTrue(any("Qwen/Qwen-Image-2.1-Turbo/raw/d65dbc9a" in c["url"] and c["url"].endswith("/model_index.json")
|
||||
for c in self.calls()), "the Turbo checkpoint is asked for at its pinned revision")
|
||||
|
||||
def test_every_digest_and_revision_an_installer_pins_is_read_here(self):
|
||||
"""The Qwen4 35B-A3B lane's checkpoint, draft and image, the OCR lane's model and image and the NVIDIA Nemotron
|
||||
Transcribe lane's image were pinned by their installers and read by nothing here: a revision or a digest removed
|
||||
upstream went unseen by the daily watch (code review of v1.62.0). Every variable an installer gives a digest or a
|
||||
40-hex revision is one this script reads."""
|
||||
script = SCRIPT.read_text()
|
||||
pinned, unread = 0, []
|
||||
for f in sorted(REPO.glob("install*.sh")):
|
||||
for name in re.findall(r'^([A-Z0-9_]+)="(?:\$\{[A-Z0-9_]+:-)?(?:[\w./-]+@sha256:[0-9a-f]{64}|[0-9a-f]{40})\}?"',
|
||||
f.read_text(), re.M):
|
||||
pinned += 1
|
||||
if not re.search(rf"\$\{{?{name}\b", script):
|
||||
unread.append(f"{f.name}: {name}")
|
||||
self.assertGreaterEqual(pinned, 50)
|
||||
self.assertEqual(unread, [])
|
||||
|
||||
def test_the_qwen4_and_ocr_lanes_and_the_transcribe_image_are_checked(self):
|
||||
rc, out = self.run_pins()
|
||||
self.assertEqual(rc, 0, out)
|
||||
for label in ("qwen4-35b", "qwen4-35b-draft", "ocr", "ocr-tokenizer", "ocr-image", "qwen4-35b-image", "transcribe-image"):
|
||||
self.assertIn("ok", self.line(out, label), out)
|
||||
q4 = (REPO / "install-qwen4-35b.sh").read_text()
|
||||
for repo, rev in ((pin(q4, "QWEN4_35B_REPO"), pin(q4, "QWEN4_35B_REV")),
|
||||
(pin(q4, "QWEN4_35B_DRAFT_REPO"), pin(q4, "QWEN4_35B_DRAFT_REV"))):
|
||||
self.assertTrue(any(f"{repo}/raw/{rev}" in c["url"] for c in self.calls()), f"{repo} asked for at its pinned revision")
|
||||
|
||||
def test_the_minimax_h3_image_lane_is_checked_too(self):
|
||||
# its checkpoint and its text encoder at their revisions, SGLang's commit and its wheel, the recipe's flash-attn-4
|
||||
# on PyPI and FlashInfer's two wheels by the digest their release publishes (v1.50)
|
||||
@@ -624,7 +654,7 @@ class TheEndpointsThatDoNotAnswer(PinsBase):
|
||||
for label in self.GITHUB:
|
||||
self.assertIn("HTTP 504 from the GitHub API, so not checked", self.line(out, label), out)
|
||||
self.assertNotIn("no such", self.line(out, label), out)
|
||||
self.assertIn("10 of 78 pins could not be asked about", out)
|
||||
self.assertIn("10 of 85 pins could not be asked about", out)
|
||||
self.assertIn("run it again before re-pinning anything", out)
|
||||
self.assertNotIn("A removed upstream revision", out)
|
||||
|
||||
|
||||
Reference in new issue
Block a user