You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Saving captured Chat Completions NaN log probabilities writes JSON null, which fails validation on load. Encoding NaNs as strings also exposes equality checks that reject separately parsed NaNs when matching tokenized histories to their source exchanges and groups.
Use Pydantic's string encoding for non-finite numbers and NaN-aware source comparisons. JSON and compact round-trips preserve canonical exchange references for single-history and multi-history trajectories and groups, including tensorized forms. Actual source mismatches still raise. Token flags and training behavior stay unchanged.
Filter unrelated calls by capture timestamps before the NaN-aware fallback, avoiding repeated serialization of every nonmatching exchange. Full equality still verifies candidates with matching timestamps.
Validation: 300 focused tokenization, compact serialization, tokenized-model, and tensorized-model tests passed. Regressions cover finite and NaN captured log probabilities, source identity after restoration, rejection of mismatched groups, and bounded serialization work for multi-exchange histories. A 150-exchange local benchmark restored JSON in 36 ms with finite logprobs and 64 ms with NaNs. Ruff, formatting, and type checks for touched files passed.
Known pre-existing limitation: legacy Completions responses with NaN token_logprobs still need separate provider-model serialization support.
Consolidated review record (automated agent review traffic removed 2026-09-17)
Change. Captured Chat Completions NaN log probabilities were saved to trajectory JSON as null and failed validation on load. The shared model base now encodes non-finite floats as strings, and source-exchange matching is NaN-aware and timestamp-filtered so round-tripped histories still resolve.
Review. McCarthy and Minsky reviewed ff96504; both returned CLEAR for source correctness. The PR merged at b4ef151, which adds the source-matching fixes and has no recorded agent review. McCarthy verified the regressions fail on base and pass on head across eight NaN/Infinity/finite cases; Minsky ran test_tokenize.py (247 passed) with a negative control. CI at review: trainer-rank-gpu-validation passing, quality-checks pending; the description reports 300 focused tests and lint/type checks passing.
Findings addressed during review.
Tokenized-wrapper JSON and tokenized-group compact round-trips still failed at ff96504 because source reconciliation rejected separately parsed NaNs; the merged head adds NaN-aware comparisons and capture-timestamp filtering.
Deferred / follow-ups.
Legacy Completions responses with NaN token_logprobs still need provider-model serialization support (pre-existing; no issue recorded).
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
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.
Saving captured Chat Completions NaN log probabilities writes JSON
null, which fails validation on load. Encoding NaNs as strings also exposes equality checks that reject separately parsed NaNs when matching tokenized histories to their source exchanges and groups.Use Pydantic's string encoding for non-finite numbers and NaN-aware source comparisons. JSON and compact round-trips preserve canonical exchange references for single-history and multi-history trajectories and groups, including tensorized forms. Actual source mismatches still raise. Token flags and training behavior stay unchanged.
Filter unrelated calls by capture timestamps before the NaN-aware fallback, avoiding repeated serialization of every nonmatching exchange. Full equality still verifies candidates with matching timestamps.
Validation: 300 focused tokenization, compact serialization, tokenized-model, and tensorized-model tests passed. Regressions cover finite and NaN captured log probabilities, source identity after restoration, rejection of mismatched groups, and bounded serialization work for multi-exchange histories. A 150-exchange local benchmark restored JSON in 36 ms with finite logprobs and 64 ms with NaNs. Ruff, formatting, and type checks for touched files passed.
Known pre-existing limitation: legacy Completions responses with NaN
token_logprobsstill need separate provider-model serialization support.