Release chained QRF forests after their draws - #402
Merged
Conversation
The chained-equations predict conditions on drawn values, never on the fitted models, so each target's forests can be freed the moment its draws complete: predict(release_models=True). Draws are bit-identical; only model lifetime changes. With max_samples_leaf=None every forest retains its full leaf-sample store, so the 40-output PUF tax-detail stage's resident peak drops from the sum of forty forests to the largest one. Only that stage is flipped: the housing/rent stage predicts twice (PUF-half re-imputation) and keeps default lifetime. A released model refuses further predicts loudly. Build M's base jetsammed four times at ~80GB dirty RSS in exactly this stage (OpenMP forest frames, working set oscillating at the kill line). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
qrf-release-models
branch
from
July 12, 2026 21:06
30d9576 to
fcc5775
Compare
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.
What
Frees each fitted forest immediately after its draws complete in the chained QRF imputation, instead of retaining every
_TargetModel's forests for the stage's full lifetime.Why
Build M's base rebuild jetsams at ~79–80GB of dirty RSS inside the QRF fit stage (four kills; stage identified by native-frame sampling:
quantile_forest/_treeunder libomp). Withmax_samples_leaf=None, each fitted forest retains full leaf-sample populations; the chained stage accumulates dozens of them concurrently. Draw-then-release collapses the concurrent-model footprint to one forest at a time. Draws are unchanged (same seeded order, same models — only their lifetime shortens); populace-fit suite passes.Companion to #401 (bounded predict); together they bound both sides of the QRF stage's working set.