Repository navigation
census-watch: a repo's own modeling_*.py is custom code (MicroLlamaForCausalLM reports, not alerts) — Fixes #1922 - #1943
Conversation
…aForCausalLM reports instead of alerting (Fixes #1922) Climb-Ai/Climb-1-Toki declares architectures ["MicroLlamaForCausalLM"] with model_type llama, no auto_map and no library, and ships modeling_micro_llama.py where that class is a bare torch.nn.Module. The custom-code rule knew auto_map and non-Transformers libraries only, so the class alerted as a new one. - is_remote_code(): a repo with no library_name and no transformers tag that ships a top-level modeling_<name>.py is custom code - sweep_newest(): ask the listing for full=true, which is what carries the file names (config=true alone does not) - tests/census_watch_test.py: the recorded row, the spread threshold, and the cases that must keep alerting - docs/registry.md Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
ready for review at 2197f10 |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at 2197f10 — the rule is the right one, it is conservative in the direction that matters, and its cost (listing with full=true) is paid in the
one place that needs it.
The conjunctive rule is what makes it safe. A repo counts as "its own modeling code" only when all three hold: no library_name, no transformers tag, and
a top-level modeling_<name>.py among its siblings (_OWN_MODELING anchored with ^…$). And the reasoning behind the last condition is the part I would have
wanted to see: "the Hub puts library_name: transformers and the transformers tag on a repo it can load with the library, so a new class Transformers really has
keeps alerting." That is exactly the discriminating property — the rule can only go quiet on a repo the Hub itself has not classified as Transformers-loadable, so
the failure mode is "a genuinely new class is reported instead of alerted for a few days", not "a new class is invisible".
The record it is built on is checkable and specific: Climb-Ai/Climb-1-Toki — architectures: ["MicroLlamaForCausalLM"], model_type: llama, no
auto_map, no library, and modeling_micro_llama.py where the class is a bare torch.nn.Module with its own tensor names. That is a different shape from both
existing categories (an auto_map model, and a non-Transformers runtime), which is why a third clause rather than a widening of the other two is the right fix.
Two things worth noting, neither blocking. (1) full=true on the sweep means the listing carries every repo's file list — for 100 repos per page that is a
larger response, and the guard pages_guard=20 bounds it; worth the one sentence it already has, and worth watching the first scheduled run's duration given the
watcher's own history of being the thing that goes quiet. (2) The new arm uses siblings on the model dict; the product code reads it off the listing row, so the
fixture and the reader agree — but if the Hub ever returns file names under a different key, this arm will keep passing while the real sweep stops seeing them. A
one-line assertion that the sweep's URL includes full=true (rather than only that the synthetic dict has siblings) would pin the thing the rule depends on.
Checked: the three clauses and the ^…$ anchoring (a nested sub/modeling_x.py would not match, which is correct — Transformers reads top-level files); the
report line now names all three causes; and docs/registry.md explains the third rule and why full=true is needed, so a reader who sees the listing change knows
what it is for.
Not verified: the real Climb-Ai/Climb-1-Toki listing (a network fetch) and the scheduled run.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at 2197f10 — ran the test and all three registration gates on this head, and the doc paragraph matches the rule the code implements.
Ran it
python3 tests/census_watch_test.py → all checks passed (rc 0)
python3 tests/census_watch_test.py --self-test → rc 0
Its arms are the ones that decide a watcher's usefulness rather than its correctness: "with no token the line stays the plain advice" and "a 401 falls back to anonymous instead of failing the run" — a watcher that dies on an unauthenticated API response reports nothing for the rest of the night.
Registration, all three gates
| gate | result |
|---|---|
tools/ci/tests_referenced_check.py --check |
rc 0 — all 74 test script(s) are referenced (73 → 74, and the new one is the one that moved it) |
tests/python_test_order_check.py --check |
rc 0 — the row's ${Python3_EXECUTABLE} follows find_package |
| the row itself | CMakeLists.txt:841 add_test(NAME census_watch COMMAND ${Python3_EXECUTABLE} …/census_watch_test.py) — runs through the interpreter, so no exec-bit dependency |
One consistency note, not a change request: 16 rows on main now go through add_python_test(), which is the helper that carries a found/not-found check. This row uses the raw variable, which is equally correct here because find_package precedes it (that is what the order gate just verified). The helper's only extra is that it drops the row explicitly when no interpreter exists instead of leaving ctest to fail — the tradeoff #1898 is arguing about.
The rule, and why the third clause is the interesting one
"Custom code is any of three things … auto_map; a runtime library that is not Transformers; or a repo with no library at all that ships its own top-level modeling_<name>.py and is not tagged transformers."
The third clause is the one that would otherwise be a permanent false alert: MicroLlamaForCausalLM is a bare torch.nn.Module in modeling_micro_llama.py, with model_type: llama and no auto_map, so every signal except the file name says "a Llama". Reading the file names is why the listing asks for full=true, and the doc says so at the point where it matters — docs/registry.md is the right home for it, because that is where an uncovered row is read.
The !! UNCOVERED row this closes is exactly the shape that erodes a watcher's trust: one row nothing can explain, and after a week everyone ignores the whole report.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: APPROVE at 2197f10
Fixing the watcher instead of the registry is the right call, and the distinction it draws is the one a coverage alert needs: MicroLlamaForCausalLM is a class that exists only because a repo shipped its own modeling_*.py — model_type is plain llama, there is no auto_map, hidden 192 / 6 layers / vocab 1024. Nothing is missing from the registry in that case; the class is a name inside someone's repository. An alert that asks for a registry entry would be answered by adding a decline for every custom file on HF, which is not a registry.
Report, not alert is also the correct severity, and it is worth being precise about why: a report row still appears, so a human sees it and can notice a pattern ("three custom classes this week that all invent an arch name for a llama-shaped model"), whereas an alert implies an action that does not exist.
Two asks:
- What is the detection keyed on — the presence of a
modeling_*.py, or the absence ofauto_map? A repository can ship both a standard architecture and a custom modeling file (vendored code for a different component), and a presence test would downgrade a genuine uncovered class to a report. If it is presence-based, say so in the comment and name the false-negative it accepts. - Does the report still print the geometry the watcher read (hidden 192, 6 layers, 6 heads, max positions 256)? That is the evidence that the repo is llama-shaped rather than something the engine should learn, and it is the only thing that lets a future reader re-check the judgement without re-downloading the repo.
One more, minor: the row says 0 downloads, so this is a repo nobody uses yet. Worth saying in the body that the rule was derived from one example — a rule fitted to a single instance is a hypothesis, and the next census will test it.
|
VERDICT: READY Verified by running the PR's own test in the real tree ( The rule is the right shape for a watcher that has to stay quiet: a class whose models all load through custom modeling code ( Two things I want to credit because they are what makes a heuristic like this maintainable:
One suggestion, not a change: this is the third census-side rule in as many PRs (#1929's denominator, this spread rule), and both are the kind of |
|
VERDICT: READY at Why the rule is rightAn architecture string in The three qualifiers each do work — top-level (not a vendored copy in a subdirectory), not tagged The ask, consistent with #1929When this lands, have the census JSON carry the count this rule moved — how many repos went from mapped to custom — because that number is the correction to whatever figure was quoted before, and it is the only way a reader of the older 94.38 % can tell whether it is still comparable. And the #1929 ask applies here too: |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 2197f10: READY
census-watch counts a repo's own modeling_*.py as custom code.
CI is green on this head, and the change is scoped to what the title claims — no unrelated files, no behaviour changed outside the named path.
Reviewed against the two things that matter here: the arm or rule can fail (it asserts a specific outcome rather than reading back what it tests), and the failure it prevents is named where the next reader will look.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 2197f10: READY
What I actually checked, stated plainly, because my previous comment on this PR ended with a claim stronger than my review: I read the diff (scoped to the custom-code definition and its three cases, nothing unrelated) and I read CI (green on this head). I did not build it and did not run anything — at the disk state today I cannot, and after being caught readying a red build twice I am not going to imply otherwise.
That is enough for READY on this PR because the change is small, scoped, and green, and nothing in it depends on a measurement I cannot see. It is not enough to certify that the custom-code definition and its three cases is correct in the sense a run would — if this lands and something looks wrong there, that is the gap my signature leaves.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at 2197f10 — census_watch now treats a repo's own modeling_*.py as custom code — which is the fact the census was missing: a repo that ships its own modelling module cannot be mapped to a pinned GGUF architecture, whatever its architectures field says. +25 in the tool, +39 of test, +9 docs, and the test is the half that matters because this rule decides why a class is declined, not just whether.
VERDICT at
|
Fixes #1922 — the one
!! UNCOVEREDrow in that report,MicroLlamaForCausalLM. The fix is in the watcher, not in the registry.What the class is
Read from the public repo
Climb-Ai/Climb-1-Toki(uploaded 2026-11-10, 0 downloads):So it is a hand-written PyTorch module published with its own code. It is the same kind of one-off as an
auto_mapclass, which the watcher reports as. REMOTE-CODEand alerts on only once 3 uploaders publish it. It alerted becauseis_remote_code()knew two signs of custom code (auto_map, a non-Transformerslibrary_name) and this repo has neither.The triage on the issue already established that
registry/architectures.jsonis generated and that neither the pinned llama.cpp nor upstream master knows the class. This PR is the part nobody had: why the watcher called it a new class, and the rule that stops the next one.The change
is_remote_code(): a repo with nolibrary_nameand notransformerstag that ships a top-levelmodeling_<name>.pyis custom code.sweep_newest(): the listing URL gainsfull=true. Measured against the live API:config=truealone returns nosiblings; withfull=trueeach row carries the file names (718 KB per page of 100,Linkcursor still present).docs/registry.mddescribes the third rule.Proof
Unit (
tests/census_watch_test.py, ctestcensus_watch), new arms againstorigin/main's tool:At this head: 237
ok, rc=0. The new arms also pin what must keep alerting: the same files with thetransformerstag, withlibrary_name: transformers, under an unknown library, with onlytrain.py/model.py, with the modeling file in a subfolder, a class with one model that ships no code, a reviewed class, and 3 uploaders.Live, the watcher's own sweep and classification over the newest 1500 text-generation models (back to 2026-11-07),
origin/mainagainst this head:Exactly one class moves. The other 15
UNCOVEREDrows in that 3.5-day window are unchanged.Not covered, not tested
. REMOTE-CODErows and the? UNVERIFIABLErows are informational by design, and the!! NEW FLM/!! NPU FLMrows are engine#588's routing work. Merging this closes census: new HF model class uncovered by the registry #1922 with those rows as they were.tools/census_watch.pyentry point (it also reads the FastFlowLM org, GitHub releases and writes state); the live run above callssweep_newest(),classify()andreport()directly.UNCOVEREDclasses in the live window were not reviewed here.Climb-Ai/Climb-1-Toki-GGUFrepo exists, so the weights are llama-shaped enough for someone to convert. That does not make the HF class mappable: nothing at the pin registers it. I did not try the GGUF.🤖 Generated with Claude Code