Skip to content

[RFC 0005] Persist C++ Samples in Model Objects for Continued From-Memory Sampling #407

Description

@andrewherren
  • R/Python model object holds a persistent pointer to the C++ BARTSamples / BCFSamples object.
  • Also retain the BARTSampler / BCFSampler (RNG state + data refs) for the model's lifetime; one sampler state per chain for multi-chain.
  • Lazy unpack: only materialize parameter arrays into R/Python when queried via extract_parameter.
  • Deprecation shim for moved fields (e.g. global_var_samples, leaf_scale_samples):
    • Python __getattr__ maps moved attr → extract_parameter(key), emits DeprecationWarning.
    • R $.bartmodel (and $.bcfmodel) overload maps moved field → extract_parameter, emits warning.
    • Document the shim is for one deprecation cycle; later release raises (Python) / returns NULL (R).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions