RFC 0004 / RFC 0005: Refactor all remaining sampling logic from R / Python to C++ and standardize serialization#356
Open
andrewherren wants to merge 193 commits into
Open
RFC 0004 / RFC 0005: Refactor all remaining sampling logic from R / Python to C++ and standardize serialization#356andrewherren wants to merge 193 commits into
andrewherren wants to merge 193 commits into
Conversation
… wrap a C++-owned BARTSamples object, and unpack into R as needed
…ram migration R Package Unit Tests were failing on several fronts left over from the single-owner ($samples) migration: - Real-code accessor bugs read removed model fields: kernel.R (computeForestLeaf* -> $samples$leaf_scale_*_samples()) and bcf.R summary()/plot() (-> $samples$...()). The kernel path was the source of the `checking examples` failure. - Five test files still used removed $-accessors; migrated to $samples$...(). - BCF serialization segfault: .migrateBcfJsonV0ToV1 was missing the parameter-trace renames, so legacy JSON reached the C++ layer with old names -> empty b0/b1 arrays -> predict() read out of bounds. Added the initial_sigma2->sigma2_init, b_0_samples->b0_samples, b_1_samples->b1_samples renames to the migration (no-ops when absent), so the migration owns all renames. Removed the now-dead read-time initial_sigma2 fallbacks in the loader, and rewrote the test to build a real v0 (schema_version 0) fixture. - test-samples-container.R exercised a removed from_components R6 constructor and stale expect_error messages; rebuilt containers via create*SamplesFromJson and matched the current extractForest() message. - test_json.cpp gtest: ToJson() -> AppendToJson() after the rename. Full R suite green (0 failed / 934 passed); C++ json gtest builds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…s to samples objects
…dling of missing test data in both R and Python
The branch predated main's post-tag / PyPI-detail / reproducibility additions to RELEASING.md, so relative to main it read as removing them. Reset to main's version so the overhaul PR carries no RELEASING.md change and the eventual merge stays clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
For a full overview of the design, see the RFC 0004 doc