-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Is your feature request related to a problem? Please describe.
Successive versions of stochtree sometimes enhance BART / BCF model objects with new parameters or tracking terms, thus changing the format of the JSON objects to which stochtree serializes models. This means models fit under prior versions of stochtree cannot always (easily) be deserialized.
Describe the solution you'd like
The ideal solution is twofold:
- We include stochtree version metadata in JSON objects going forward
- Add logic to detect / estimate the version of stochtree under which a model was fit and work around missing terms / parameters / metadata
Describe alternatives you've considered
There aren't many obvious alternatives to the new feature described above, but there are workarounds. One could use stochtree's API for interacting with JSON objects to directly deserialize forest terms, parameters, etc... and obtain predictions / posterior summaries from those objects. This is not an ideal workflow for users who expect deserialization + prediction to work out of the box, but it should make for a sufficient workaround until this feature is added to stochtree.
Additional context
User reported deserialization issue after updating to 0.4.1, their previous version model was serialized without the following fields:
linkandoutcomeinoutcome_model- “rfx_model_spec” (user also noted that
has_rfxwasFALSE, so this should not matter) multivariate_treatmentbart_propensity_modelwas also missing the twooutcome_modelparameters