Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Runs the same three checks as .github/workflows/ci.yml before a commit is
# Runs the same four checks as .github/workflows/ci.yml before a commit is
# created, so a red X on GitHub is caught here instead of arriving as mail
# minutes later. This is the whole reason the hook exists: every failed CI run
# in this repository's history was a commit that would not have passed
Expand Down Expand Up @@ -72,4 +72,22 @@ run "Clippy" "yukaridaki uyarilari duzelt" \
cargo clippy --all-targets --all-features -- -D warnings
run "Test" "cargo test --all-features" cargo test --all-features

# data/models.json is generated from scripts/add_models.py. A hand edit to the
# JSON is overwritten by the next run of the script, so it is stopped here.
# `python3` on Windows can be the Store stub that exits with an error, so each
# candidate is tried rather than just looked up.
py=""
for candidate in python3 python; do
if "$candidate" -c "" >/dev/null 2>&1; then
py=$candidate
break
fi
done
if [ -n "$py" ]; then
run "Catalog" "degisikligi scripts/add_models.py'ye tasi ve calistir" \
"$py" scripts/add_models.py --check
else
echo "pre-commit: python bulunamadi, katalog kontrolu atlaniyor" >&2
fi

echo "pre-commit: hepsi gecti"
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ jobs:
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings

catalog:
name: Catalog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

# data/models.json is generated from scripts/add_models.py; a hand edit
# to the JSON would be lost on the script's next run.
- name: Check the catalog matches its generator
run: python scripts/add_models.py --check

fmt:
name: Format check
runs-on: ubuntu-latest
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,9 @@ Databricks · Tencent · Baidu · ByteDance · LG AI · Allen AI · TII ·
Hugging Face · OpenBMB · Liquid AI · Arcee · Nous Research · Perplexity ·
Shanghai AI Lab · BAAI · Nomic · Jina · and more.

The catalog is generated by `scripts/add_models.py`, which merges entries by
`id` so re-running it corrects a record rather than duplicating it.
The catalog is generated by `scripts/add_models.py`, the only place a record is
written. CI runs it with `--check`, so a hand edit to `data/models.json` fails
the build instead of being lost on the script's next run.

---

Expand Down
10 changes: 1 addition & 9 deletions data/models.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ image would each need release automation and signing.
runtime tags, partial geometry and implausible values
4. Rebuild; the catalog is embedded at compile time

Correcting or removing a record works the same way: edit or delete its entry in
the script and run it. Never edit `data/models.json` by hand. The script
rewrites every record from its own entries, and `--check` (run by CI and the
pre-commit hook) fails while the two disagree.

Geometry (`layers`, `hidden_size`, `kv_heads`, `head_dim`) is optional but
worth having: with it the KV cache is exact, without it llmspec falls back to
a heuristic derived from one model's proportions. Supply all four fields or
Expand Down
Loading
Loading