Skip to content

Picker contract test: follow the Ollama MLX tag predicate - #18372

Merged
danielhanchen merged 1 commit into
mainfrom
ci/picker-contract-follow-mlx-ollama-tags
Nov 18, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/picker-contract-follow-mlx-ollama-tags

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

tests/studio/test_model_picker_contracts.py::test_the_chat_picker_marks_ollama_targets_unloadable_by_the_api fails on main:

AssertionError: assert 'return !isLora && !ids.some(isOllamaLinkPath);' in '...'

Seen in "Repo tests (CPU, studio)" on the staging run for #17742, which is on current main.

Cause

#18253 lists and loads Ollama MLX-format tags. Their checkpoint directories sit under the same ollama_links tree, but the resolver does index them. So apiAutoSwitchMayLoad and the override backfill (migrate-model-overrides.ts) now exclude only a materialized .gguf link, isMaterializedOllamaLink, instead of every isOllamaLinkPath. That change is intended and covered by model-identity.test.ts. The contract test still pinned the old line.

Fix

Test-only:

  • Pin the new predicate in apiAutoSwitchMayLoad and in the backfill.
  • Also pin isMaterializedOllamaLink's definition (isOllamaLinkPath(modelId) && !isOllamaMlxModelId(modelId)). A materialized .gguf link stays unloadable, which is what this test exists to guard.

Verification

features/hub/lib/model-identity.ts Result
main 205 passed (before: 1 failed)
isMaterializedOllamaLink reduced back to every link (sabotage) this test fails

ruff is clean.

#18253 lets the API load an Ollama MLX tag's checkpoint, which the
resolver indexes, so apiAutoSwitchMayLoad and the override backfill now
test isMaterializedOllamaLink instead of isOllamaLinkPath.
test_the_chat_picker_marks_ollama_targets_unloadable_by_the_api pinned
the old line and fails on main. Pin the new predicate and the definition
that keeps a materialized .gguf link unloadable.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T18:00:17.862001Z 9c15ed8 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 9c15ed8e09

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 6ee65b3 into main Nov 18, 2026
@danielhanchen
danielhanchen deleted the ci/picker-contract-follow-mlx-ollama-tags branch November 18, 2026 18:01
danielhanchen added a commit that referenced this pull request Nov 18, 2026
…th_zoo is absent (#18338)

## Summary

A test fix for a check that fails on every PR against current main.

### 1. Trainer-backed num_proc veto tests without unsloth_zoo

These tests, added in #17701, import `core.training.trainer`, which
imports unsloth and so needs `unsloth_zoo`:
- `test_the_batched_packing_pool_asks_the_same_veto` (through
`_pack_num_proc`'s lazy import of the trainer);
- the five `test_block_swap_counts_for_the_veto_only_when_it_offloads`
cases.

Some CPU CI buckets (Repo tests, Python 3.13 a-f) do not install the
zoo, so these fail there with `ImportError: Unsloth: Please install
unsloth_zoo`.

Both tests now call a small `_trainer_or_skip()` helper. It skips the
same way `test_dataset_preview_role_aliases.py` already does when the
zoo cannot be imported.

`studio/backend/tests/test_dataset_map_num_proc.py`:
- with `unsloth_zoo`: 40 passed, nothing skipped;
- without it: 32 passed, 8 skipped (6 failed before).

The Unreal level tools encoding fix and the model picker contract update
this PR also carried landed separately on main (#18344, #18372), so this
branch now takes main's versions of those files.
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