Skip to content

Studio: fix stale GGUF load-marker ordering test after llama_extra_args relocation - #7252

Merged
danielhanchen merged 1 commit into
mainfrom
studio-fix-gguf-load-marker-order-test
Jul 20, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
studio-fix-gguf-load-marker-order-test

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

#6414 relocated the llama_extra_args inheritance block out of the GGUF branch in _load_model_impl and into _guard_chat_load_against_training, which runs before the branch. test_load_marker_precedes_hub_guard_and_unload slices routes/inference.py from if config.is_gguf: to the end and asserts an ordering that still lists if request.llama_extra_args is None as a landmark, which now sits ahead of that slice, so str.index raises ValueError: substring not found.

The Backend tests job only runs on pull_request, not on push to main, so main went red on this test without surfacing on the default branch. It fails the (Python 3.10) Backend tests job on every open PR whose merge picks up the relocation.

The guarantee the test protects is intact: the gguf_load_in_flight marker is entered before the hub-download guard and the unload. This drops the relocated landmark from the ordering so the assertion matches the current structure, and adds a short comment noting where the inheritance now runs.

Verified locally: test_gguf_load_cache_reuse.py::TestLoadHubDownloadExclusion -> 10 passed.

…location

#6414 moved the llama_extra_args inheritance out of the GGUF branch in
_load_model_impl into _guard_chat_load_against_training, which runs before the
branch, so 'if request.llama_extra_args is None' is no longer inside the
gguf_branch slice that test_load_marker_precedes_hub_guard_and_unload checks.
The assertion failed on that now-missing landmark even though the guarantee it
protects (the gguf_load_in_flight marker is entered before the hub-download
guard and the unload) is intact. Drop the relocated landmark from the ordering
so the test matches the current structure.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the test test_load_marker_precedes_hub_guard_and_unload in test_gguf_load_cache_reuse.py by removing an assertion check for request.llama_extra_args is None and adding an explanatory comment about its relocation to _guard_chat_load_against_training. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@danielhanchen
danielhanchen merged commit 17fd6c8 into main Jul 20, 2026
39 checks passed
@danielhanchen
danielhanchen deleted the studio-fix-gguf-load-marker-order-test branch July 20, 2026 00:19
VectorCipher pushed a commit to VectorCipher/unsloth that referenced this pull request Jul 20, 2026
…location (unslothai#7252)

unslothai#6414 moved the llama_extra_args inheritance out of the GGUF branch in
_load_model_impl into _guard_chat_load_against_training, which runs before the
branch, so 'if request.llama_extra_args is None' is no longer inside the
gguf_branch slice that test_load_marker_precedes_hub_guard_and_unload checks.
The assertion failed on that now-missing landmark even though the guarantee it
protects (the gguf_load_in_flight marker is entered before the hub-download
guard and the unload) is intact. Drop the relocated landmark from the ordering
so the test matches the current structure.

Co-authored-by: danielhanchen <[email protected]>
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