Repository navigation
perf: reuse verified tree adapter snapshots - #15
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
RandomForest export/load previously rebuilt structure solely to decide where the state commitment belongs, and repeatedly validated/digested the same skops state. XGBoost rebuilt identical native tree structures through the copy and serialization round trips. This change shares verified operation-local snapshots while retaining received/native-state comparison and canonical claim/structure verification.
Warm medians of three runs, imports/training excluded, 3,000 x 12 seeded inputs:
The requested RF 3 s export/2 s load and XGBoost 3 s export/1.5 s load targets are not met. Remaining cost is bounded skops preflight/audit/construction and shared canonical JSON verification. Final profiles: RF load 28.53 -> 8.32 s under profiler,45.53M -> 15.61M calls; XGBoost 8.72 -> 6.39 s,17.72M -> 13.13M calls. RF Merkle hashing 289,430 -> 5,426 calls; XGBoost bounded JSON decodes 622 -> 22. Closing the remaining gap needs further shared JSON comparison/encoding and sklearn reference/preflight optimization.
Validation:
uv run ruff check .: all checks passed.uv run ruff format --check .: 140 files already formatted.uv run pyright: zero errors/warnings.uv run pytest: 1,270 passed, 91.89% coverage, 133.15 s.uv build: wheel and source archive produced.Final validation also compared all 8 full-size benchmark models byte for byte, loaded both reader directions,and loaded the actual 8 pre-change benchmark artifacts. The complete final matrix was rerun after timing variance in unchanged XGBoost/inspect paths; all run sets are retained in Temp.
CI on 4a952a7:all six jobs successful,including Ubuntu/Windows tests and base-wheel smoke checks. https://github.com/UlloaSP/mlbundle/actions/runs/38257554841