Skip to content

feat(executor): reserved-source materialization (#376) + binding files= on all download paths (#377)#54

Merged
PaulFidika merged 1 commit into
masterfrom
issue/376-377-source-materialization-binding-prefetch
Jul 4, 2026
Merged

feat(executor): reserved-source materialization (#376) + binding files= on all download paths (#377)#54
PaulFidika merged 1 commit into
masterfrom
issue/376-377-source-materialization-binding-prefetch

Conversation

@PaulFidika

Copy link
Copy Markdown
Contributor

Closes tracker issues #376 and #377 (agents/completed.md).

#376 — reserved-source materialization

  • Executor._run_job extracts the reserved source/destination structs from producer-kind (non-inference) payloads, populates ctx.source/ctx.destination, and materializes payload.source via ModelStore.ensure_local (same snapshot path, retry, RETRYABLE/INVALID classification, and ModelEvent emission as model bindings) before the handler runs.
  • ctx._set_source_path now has a real caller; training-endpoints transform/quant producers get a materialized snapshot dir.
  • Missing source = no-op; present-but-empty ref = INVALID.

#377 — binding files= ignored on prefetch/ModelOp paths

  • Executor.__init__ registers every endpoint binding by wire ref on the ModelStore (register_binding); ensure_local falls back to the index for bare-ref callers (ModelOp DOWNLOAD/LOAD, lifecycle startup prefetch). files=/provider now apply on ALL download paths.
  • Root cause of the fp32 pull found + fixed: select_hf_files treated the untagged root monolithic checkpoints (sd1.5's v1-5-pruned*.safetensors, 12GB) as their own weight group, and "untagged" always won for that group even though fp16 component weights exist. Diffusers-layout repos now exclude root single-file checkpoints entirely.

Tests

  • tests/test_executor_source_materialization.py (5 tests): materialized dir + ctx.source metadata; missing-source no-op; empty ref INVALID; RETRYABLE/INVALID parity; inference kind ignores source.
  • tests/test_executor_prefetch_binding.py (4 tests): ModelOp + bare-ref store paths pass the binding's allow_patterns/provider at the download-layer boundary (no network); explicit binding wins; unknown ref unpatterns.
  • tests/test_hf_selection.py: sd1.5-shaped root-checkpoint exclusion test.
  • Full suite: 219 passed, 1 skipped.

Deferred: live cast-dtype run against the hub (needs hub infra + GPU; training-endpoints #37 deferral stands).

🤖 Generated with Claude Code

…iles= on all download paths

#376: producer-kind payloads carrying the reserved source struct now get a
local snapshot at ctx.source_path (and ctx.source/ctx.destination metadata)
before the handler runs, via the same ModelStore.ensure_local path as model
bindings — identical retry/classification and ModelEvents. Empty source.ref
is INVALID; absent source is a no-op.

#377: Executor registers each endpoint binding by wire ref on the ModelStore;
bare-ref callers (ModelOp DOWNLOAD/LOAD, lifecycle startup prefetch) now
recover files=/provider instead of falling back to whole-repo downloads.
Also fixes the fp32 pull root cause: select_hf_files no longer downloads
root monolithic checkpoints in diffusers-layout repos (sd1.5's untagged
v1-5-pruned*.safetensors won the root group despite fp16 component weights).
@PaulFidika PaulFidika merged commit 62a1431 into master Jul 4, 2026
1 check passed
@PaulFidika PaulFidika deleted the issue/376-377-source-materialization-binding-prefetch branch July 4, 2026 19:20
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