Skip to content

Follow the third load site in the pinned-row contract test - #7748

Merged
danielhanchen merged 1 commit into
mainfrom
fix-model-picker-contract-count
Aug 2, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix-model-picker-contract-count

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

main has been red since #7736. tests/studio/test_model_picker_contracts.py::test_a_pinned_cached_row_loads_from_the_id_the_backend_pinned fails on every PR branched after it, for reasons unrelated to what those PRs change, which is how I ran into it.

assert picker.count("loadId: c.load_id") == 2
E   AssertionError: the safetensors row and its gear need the pin
E   assert 3 == 2

The assertion counts the sites that pass the pinned snapshot id into the load meta, and expected two: the safetensors row and the gear beside it. #7736 added a third, the collapsed single-quant GGUF row, and that row is a load site like the other two and correctly carries the pin. So the code is right and the count was stale.

Bisected: 3742317f7 passes, 63307b17f (#7736) fails.

Counted rather than matched loosely on purpose, so a row that forgets the pin fails here instead of silently loading from the repo default ref. I kept it that way and moved the count, rather than relaxing it to >= 2 and giving up the property. Checked that it still fails if any one of the three sites drops the pin.

main is red: tests/studio/test_model_picker_contracts.py fails on every PR since
#7736, which is unrelated to what those PRs change.

The assertion counts the sites that pass the pinned snapshot id into the load
meta, and expected exactly two: the safetensors row and the gear beside it. #7736
added a third, the collapsed single-quant GGUF row, which is a load site like the
other two and correctly carries the pin. The code is right and the count was
stale.

Bisected to 63307b1. Counted rather than matched loosely on purpose, so a new
row that forgets the pin fails here rather than silently loading from the default
ref, so the count follows the code instead of being relaxed. Verified it still
fails when any one of the three sites drops the pin.
@danielhanchen
danielhanchen merged commit a0a7fc1 into main Aug 2, 2026
20 of 21 checks passed
@danielhanchen
danielhanchen deleted the fix-model-picker-contract-count branch August 2, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant