pgw#1346 K11: the eager tier gets a runtime binding, so inst.tuned exists - #930
Open
PaulFidika wants to merge 1 commit into
Open
pgw#1346 K11: the eager tier gets a runtime binding, so inst.tuned exists#930PaulFidika wants to merge 1 commit into
PaulFidika wants to merge 1 commit into
Conversation
…ists B5 landed the declaration half — `render_eager` emits a real `Model` subclass for a model with no graph classes. What no code did was BUILD one on the serving path: `residency.instance_for` refused any model with neither an eager module nor an armed cell, and a runner-less model has neither by construction. So every eager model was unconstructible, `inst.tuned` was unreachable, and since `inst.tuned` is the entire replacement for `ctx.defaults`, that one refusal gated anima (5 defaults reads), hidream (14), the auxiliary model class, and all 11 weight-bearing boundary endpoints at once. A model that declares no runners is now complete with a ref and its tuned values. The refusal stays for a model that DECLARES a graph and has nothing to run it — that is still a pod-level failure, and handing back an instance would move the error somewhere useless. `NoGraphBacking` gives the state its own name rather than reusing an empty `EagerBacking`, whose refusal would read "no eager module bound for runner 'x'; it has []" and send the reader hunting for a registration that was never supposed to happen. "Nothing to arm, by declaration" and "not armed yet" are different answers and only one of them is a defect. `inst.path` and `inst.pipeline` are the tier's serving surface, the way a typed runner call is a graph model's. Measured across the boundary batch: 8 of 11 hand a local path to an external binary or a custom loader, 3 use an object the worker built. Both refuse by name instead of returning an empty path or None — a handler that shells out with "" fails somewhere far away and confusingly. The executor materializes the path through the SAME `store.ensure_local` call that already served slot-path injection, so the two routes cannot disagree. 9 new tests; mypy clean over 913 files; ruff clean; serve-role closure, unreached surface, fence symbols, registry contract and the binding gate all green.
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.
Unblocks K11 (B3b) and the
ctx.defaultsmigration for every eager endpoint.The gap
B5 landed the declaration half —
render_eageremits a realModelsubclass for a model with no graph classes. What no code did was build one on the serving path:residency.instance_forrefused any model with neither an eager module nor an armed cell, and a runner-less model has neither by construction.So every eager model was unconstructible,
inst.tunedwas unreachable, and sinceinst.tunedis the entire replacement forctx.defaults, that one refusal gated anima (5 defaults reads), hidream (14), the auxiliary-model class, and all 11 weight-bearing boundary endpoints at once.The fix
NoGraphBackingnames that state instead of reusing an emptyEagerBacking, whose refusal would read "no eager module bound for runner 'x'; it has []" and send the reader hunting for a registration that was never supposed to happen. "Nothing to arm, by declaration" and "not armed yet" are different answers; only one is a defect.The eager tier's serving surface
inst.pathandinst.pipeline, the way a typed runner call is a graph model's. B5's measurement: 8 of 11 weight-bearing boundary endpoints hand a local path to an external binary or a custom loader; 3 use an object the worker constructed.Both refuse by name rather than returning an empty path or
None— a handler that shells out tollama-serverwith""fails somewhere far away and confusingly. The executor materializes the path through the samestore.ensure_localcall that already served slot-path injection, so the two routes cannot disagree.This is also the shape F0(b)'s path-kind would need, so it is deliberately expressed on the instance — it works whichever way Paul rules F0.
Verification
tests/test_eager_binding_pgw1346.pymypy src/gen_worker tests tests_v2— Success: no issues found in 913 source files;ruffcleanlint_serve_role_closure(both roles),lint_serving_process_compiles,lint_unreached_surface,lint_fence_symbols,check_registry_contract,check_model_bindings,lint_retired_sdk_spellings,assemble_changelog --check— green🤖 Generated with Claude Code