Repository navigation
Conversation
|
Thanks @Whq02, this is a clean addition:
Two small things:
|
`tensorfold models` prints one line a checkpoint and takes no argument, so a program that wants the inventory
parses the prose or reads the Hugging Face cache itself; `models --json` printed the usage and exited 2.
`models --json` now prints the same checkpoints as one document, {"schema": 1, "models": [...]}, each entry the
line's repo, family and model_type; a cache that does not exist yet is an empty list. The lines are unchanged,
and any other word after `models` is still the usage. The README's Models on disk names the flag.
From the review: the CHANGELOG line under Unreleased, `models [--json]` in the native binary's usage text (both
lines in main.zig), and the README says that `family` is a display title and `model_type` the key to match on.
6ca7004 to
282e5b0
Compare
|
Done as one commit on 5daafaf, 282e5b0: your CHANGELOG line under Unreleased, On that tip: |
What this changes
tensorfold modelsprints one line a checkpoint and takes no argument, so a program that wants the inventory parses thelines or reads the Hugging Face cache itself. On main at 53311e7 (and in 1.2.2 and 1.2.3):
After this change
models --jsonprints the same checkpoints as one document, in the shapecapabilities --jsonuses(here a cache holding the 2B and the 27B):
Each entry is the line's repo, family and model_type, nothing the lines don't print. A cache that does not exist yet
answers
{"schema":1,"models":[]}with exit 0, as the lines exit 0 with their hint. The lines are unchanged, and anyother word after
modelsis still the usage with exit 2. The README's Models on disk section names the flag; where itgoes is your call.
Mercury CLI integrates TensorFold as a model source and hit this: it reads the cache directory itself to list what
tensorfold servecan serve.atc overlap --json: run 2026-11-06T15:49:35Z on this head againstorigin/mainat 5daafaf (ATC 0.9.0).changedFiles5; the conflicts named are CHANGELOG.md only, with the other open PRs that add a line under Unreleased (server: a refused API key file logs the path and the mode it read #2365 among them); README.md, cli.zig, models.zig and main.zig overlap no open PR (each named head test-merged withgit merge-tree).Checks on this head
python3 tools/zig/lean_check.py, on the base and on this head: 252 on 5daafaf, 252 on this head, 0 new (tools/zig/lean_new.py: "lean: 252 problems, 252 on the base, 0 new"; the 252 are inherited, and the checker exits 1 on both for them).zig/src/cli/tests.zig, the CLI test module, compiled against the host registry (thezig testlinezig build test-cli-memory-host --verboseprints, without its three--test-filters and--listen=-): 52 pass, 0 fail, 0 skip on this head; 51 on the base. The new test,models --json prints the listed checkpoints as one document, and an absent cache as none, does not compile against the base'smodels.run(zig/src/cli/models.zig:61:22: error: expected 5 argument(s), found 6, and:77:49), so it is red there by construction; the lines test keeps passing.zig build test-cli-memory-hostitself: 15/15 on the base and on this head; its filters do not reach the twomodelstests.zig build test-golden --summary all: 5/5 steps, 322/335 and 55/55 equal to the server goldens, 0 unexpected differences (the 13 are its recorded known differences).zig fmt --check build.zig zigandgit diff --check: clean.tensorfoldfromzig build install -Dtarget=aarch64-linux-gnuran the commands above against a real cache of four checkpoints: the lines and the document agree entry for entry, an absent cache prints{"schema":1,"models":[]}with exit 0, andmodels --json --xis the usage with exit 2. Theinstallstep itself exits 1 on this head and on main alike (28/31 steps,tensorfoldinstalled):tf-qwen35-cudadoes not compile on main,zig/tests/qwen35_cuda_main.zig:259passingsaveCachefour arguments where it takes five since 443e867; not from this change.zig fmt, lean) pass locally.zig build testandzig build test-clion macOS, which compile the Metal shaders; the build host has no Metal toolchain, so the CLI module ran from the host registry build instead (the samecli/tests.zigroot;hub.familyreads the registry's families either way).zig build dev-toolsfor the same reason;models.runhas one caller,cli.zig, and notf-*tool calls it.Receipt
n/a: a CLI listing, nothing reaches inference.
Checklist