Manual placement: log the --fit verdict the launch actually carries - #10831
Open
deepspace28 wants to merge 4 commits into
Open
Manual placement: log the --fit verdict the launch actually carries#10831deepspace28 wants to merge 4 commits into
deepspace28 wants to merge 4 commits into
Conversation
…nslothai#10821) The GGUF decision line interpolated use_fit before the Manual branch set it False, so every Manual-mode load logged --fit: on while spawning --fit off (unslothai#10821). Decide Manual placement before the log from the same predicate the launch branch applies, label an empty probed list with (manual placement) so it reads as a discarded-on-purpose enumeration rather than a failed one, and re-assert use_fit=False in the launch branch so the placement try/except's --fit-on fallback can never override Manual between the two. _source-level tests pin both the hoist-above-log order and the re-assert.
for more information, see https://pre-commit.ci
Author
|
@pre-commit-ci[bot] re-run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to my report in #10821. In Manual GPU-memory mode with an explicit layer count, the backend's GGUF decision line interpolated
use_fitbefore the Manual branch turned it off — so every Manual load logged--fit: onwhile the launch it described six milliseconds later carried--fit off. Paired with the deliberately emptied GPU probe, the two lines read "failed GPU enumeration, proceeding unprotected" instead of "Manual mode, the user owns placement".Fix
load_modeldecides Manual placement from a condition that is knowable well before the log: the function argumentsgpu_memory_modeandgpu_layers. So the change:gpu_memory_mode == "manual" and gpu_layers >= 0), so the log can no longer disagree with the argv.GPUs free: [] (manual placement)— so an intentional stand-down is distinguishable from a failed probe at a glance. The dedicated empty-probe warning (correctly gated on_detected_gpus) keeps catching the genuinely failed case.use_fit = Falsein the Manual launch branch, so the placementtry/except's--fit onfallback can never override Manual between the hoist and the launch.A side effect worth noting:
_placement_verdict_partialreadsuse_fitright after the log, so under the old order a Manual load recorded a partial-placement verdict ("the planner ran and could not fit"). With the hoist it reads the Manual override — False, which is the correct claim for a mode where nothing was fitted.Tests
New
studio/backend/tests/test_manual_mode_decision_log.py— source-level onload_model, since the log site cannot be driven from a unit test:(manual placement)labeluse_fit = Falsebefore emitting--gpu-layers, so the placement fallback cannot leak into ManualAll 6 pass;
test_empty_gpu_probe_reason.pyandtest_log_filter_no_truncation.pystay green (23 + 9).Closes #10821