Repository navigation
Studio: keep the nudge wiring test collectable without the unsloth stack - #6924
Conversation
test_nudge_tool_calls_wiring.py imported InferenceBackend from core.inference.inference, which pulls in unsloth (and thus unsloth_zoo) at module scope. The dependency-light backend CI matrix job does not install unsloth_zoo, so the import raised at collection time and aborted the whole job (831 tests never ran). Guard that one import and fold the safetensors InferenceBackend checks in only when the unsloth stack is importable; the orchestrator/llama_cpp/safetensors_agentic wiring is still asserted unconditionally, and local/full-stack runs keep the InferenceBackend coverage.
|
@codex review |
There was a problem hiding this comment.
Code Review
This pull request modifies test_nudge_tool_calls_wiring.py to make the import of InferenceBackend optional. This prevents test failures in dependency-light CI environments where the unsloth stack is not installed. The tests have been updated to conditionally execute checks for InferenceBackend only when it is successfully imported. I have no feedback to provide as there are no review comments.
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.
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
What
test_nudge_tool_calls_wiring.py(added in #6883) importsInferenceBackendfrom
core.inference.inferenceat module scope. That module doesfrom unsloth import FastLanguageModel, FastVisionModel, which requiresunsloth_zoo. The Backend CI matrix job ((Python 3.10/3.11/3.12/3.13)) isdeliberately dependency-light and does not install
unsloth_zoo, so the importraised
PackageNotFoundErrorat collection time and pytest aborted the wholejob before running anything:
This turned Backend CI red on
main(all ~831 backend tests skipped by thecollection abort).
Fix
Guard the one offending import and fold the safetensors
InferenceBackendchecks in only when the unsloth stack is importable. The other entry points
(
InferenceOrchestrator,LlamaCppBackend,run_safetensors_tool_loop) neverneeded unsloth and are still asserted unconditionally, so the wiring guard keeps
working in the light job; local runs and any full-stack job still exercise the
InferenceBackendpath.Verified
InferenceBackend is None, alltests pass, no collection error.