Skip to content

feat: add size ceiling and per-train output opt-out to SaveTrainParam…#102

Merged
Theauxm merged 2 commits into
mainfrom
feat/bounded-train-parameters
Jul 13, 2026
Merged

feat: add size ceiling and per-train output opt-out to SaveTrainParam…#102
Theauxm merged 2 commits into
mainfrom
feat/bounded-train-parameters

Conversation

@Theauxm

@Theauxm Theauxm commented Jul 13, 2026

Copy link
Copy Markdown
Member

…eters

Parameter capture was global and unbounded, so a fan-out of trains returning multi-MB payloads could OOM the host serializing them concurrently and bloat trax.metadata.

MaxParameterBytes caps every serialized parameter: it streams through a byte-counting writer and aborts as soon as the cap is crossed, storing a small {"_truncated": true} placeholder instead of materializing the whole payload. ExcludeOutput (string/Type/generic) and the ShouldSaveOutputs predicate skip output for known-large trains while keeping their inputs. A null cap leaves the previous behavior unchanged.

…eters

Parameter capture was global and unbounded, so a fan-out of trains returning multi-MB payloads could OOM the host serializing them concurrently and bloat trax.metadata.

MaxParameterBytes caps every serialized parameter: it streams through a byte-counting writer and aborts as soon as the cap is crossed, storing a small {"_truncated": true} placeholder instead of materializing the whole payload. ExcludeOutput (string/Type/generic) and the ShouldSaveOutputs predicate skip output for known-large trains while keeping their inputs. A null cap leaves the previous behavior unchanged.
@Theauxm Theauxm force-pushed the feat/bounded-train-parameters branch from bc27fdc to 98d3735 Compare July 13, 2026 15:57
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…ng from coverage

Add branch tests for ExcludeOutput(Type) with a null-FullName type and the null-name opt-out path. Mark the ByteCeilingStream adapter [ExcludeFromCodeCoverage]: its Stream-contract members are never hit on a write-only stream, and the ceiling behavior is already covered through the over-cap and unbounded-output tests.
@Theauxm Theauxm merged commit 8272d9f into main Jul 13, 2026
3 checks passed
@Theauxm Theauxm deleted the feat/bounded-train-parameters branch July 13, 2026 16:13
@github-actions

Copy link
Copy Markdown

This PR is included in version 1.42.0

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