Avoid duplicate canonical encoding of generated planner reports - #1051
Merged
Merged
Conversation
bradhilton
deployed
to
trainer-rank-gpu-validation
September 29, 2026 22:56 — with
GitHub Actions
Active
bradhilton
marked this pull request as ready for review
September 29, 2026 23:16
This branch was successfully deployed
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.
Planner reports were serialized twice on the training path: the bounded encoder produced canonical bytes, then persistence parsed and re-encoded the entire report. Reporter now uses a private parsed-schema/persistence path for bytes returned directly by that same encoder. Public
validate_reportandpersist_reportretain full canonical validation for arbitrary bytes.The generated path still parses once and rejects duplicate or incorrectly ordered decoded keys, including numeric-key coercion and surrogate normalization. It adds no snapshot, API option or reporting flag. OOM/static-size fallbacks, durable publication, final shared-ledger charges and omission accounting retain their existing behavior.
Validation: 124 focused tests pass; 22 adversarial/parity controls pass on the parent too, and the encode-count regression fails on parent (two encodes) and passes here (one). Retained 1.57 MB and 2.51 MB payload comparisons preserve all 18 paired output/accounting outcomes. Three-repeat CPU healthy medians improve from 230.1→130.6ms and 383.0→221.5ms with prebuilt replay primitives; these are local component measurements, not measured remote or GPU gains. Ruff, format and targeted ty pass. Independent native Astra and persistent Cursor Opus5.5 Extra High source reviews are clear at
0ccbcbee; required CI passed: 1,396 Megatron tests, 3,188 unit tests (65 skipped, 2 deselected), and native two-H200 validation. The shortcut relies on the existing encoder configuration and must be re-derived if those encoding semantics change.