Repository navigation
Conversation
Serialize configs without the empty state-dict cleanup path and replace completed shard files atomically. Keep live config fields authoritative and preserve source-only extensions. Retain the previous shard on write failures.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
A failed progress.json publication restored _records but left the batch in _pending_records and removed its payload file, so a retry returned a record with no backing file. Drop the pending entry in the commit failure path so the retry rewrites it. Add a regression test.
Qubitium
reviewed
Nov 9, 2026
Qubitium
left a comment
Collaborator
There was a problem hiding this comment.
Review (layer 15)
Reviewed the incremental layer-15 commit (d70ddbe06, 4 files, +619). The atomic batch rename + bounded progress.json checkpoint and the interrupted-temp/unmanifested-file cleanup are sound. I pushed a fix commit (1a6f485da).
Fixed
- Failed checkpoint left a stale pending record. When
_atomic_json(progress.json)raised,checkpoint()restored_recordsand re-raised, but the batch stayed in_pending_recordswhilecommit()'s error path deleted its payload. A retry then returned a record with no backing file. The pending entry is now dropped on the failure path so the retry rewrites it. Regression test added. - Ruff
I001(import order) in both new files.
Verification
tests/test_exl3_capture_batch_spool.py: 9 passed (8 original + 1 new). ruff check clean.
Notes (not changed)
load()validates tensor geometry against the record but does not re-hash the payload; content is checked at_restore. Tampering during a live process is not detected.commit()returns the existing record for an already-committed/pending index without comparing the new tensors or metadata, so a conflicting rewrite is silently accepted.provenanceis normalized with plainjson.dumps; a non-finite value survives that step and only fails later in the canonical hash. A pre-check would give a clearer error.
Qubitium
marked this pull request as ready for review
November 9, 2026 09:01
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
Carry the existing batch spool with provenance and tensor-geometry validation, atomic batch commits, and exact committed-batch recovery. Looper callbacks follow in the replay layer.
This is layer 15/36, extracted from an already-used fork for initial maintainer feedback. It depends on #3594. Review only this feature; the cross-fork Files changed view is cumulative because the PR targets upstream
main.Incremental change: 4 files, +619/−0 lines, including carried tests and the mechanism reference. No merge is automatic. Review value and API shape first; substantial rework can follow that feedback.
Flow and existing-code boundary
flowchart TD S0["EXL3CaptureBatchSpool"] M0_0["EXL3CaptureBatchSpool.__init__"] M0_1["EXL3CaptureBatchSpool.committed_indices"] M0_2["EXL3CaptureBatchSpool.commit"] S1["canonical_json_bytes"] E["EXL3CaptureBatchSpoolError, KeyError"] S0 -. "exposes" .-> M0_0 S0 -. "exposes" .-> M0_1 S0 -. "exposes" .-> M0_2 S0 -->|"raises on rejected input/state"| E style E fill:#fee,stroke:#b22gptqmodel/utils/exl3_capture_batch_spool.py:101:EXL3CaptureBatchSpoolgptqmodel/utils/exl3_capture_batch_spool.py:44:canonical_json_bytesCommitted reference: docs/exl3-capture-batch-spool.md, linked from README. Class entry points/calls and rejected-state paths describe code present in this branch, rather than planned integrations.
Validation
Carried test files:
tests/test_exl3_capture_batch_spool.pyThis packaging pass checked Python parsing, whitespace, dependency order and balanced Mermaid blocks. The author reports successful prior use of these features. Per the requested resource limit and feedback-first scope, existing model quantization, GPU/ROCm tests, heavyweight CPU workloads and full model benchmarks were not rerun; no new performance or model-accuracy claim is made. Tests accompanying earlier stack layers retain their previously reported results.