0.3.1 - Standardized and modular InferenceData, improved memory management #55
Braffolk
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
25.12.23
This release standardizes the
InferenceDatastructure across all prediction methods, ensuring consistent dimensions (chain,draw,obs_id) and variable naming conventions. It also improves shared-memory transport for Pandas DataFrames, enabling high-fidelity roundtripping of Categoricals and mixed types between R and Python.Standardised idata
All idata returned from brmspy functions is now standardised to be joinable with one another, keep DataFrame indexes correctly in obs_id and works uniformly for univariate and multivariate models.
return_idata: boolargument. In case of large models, using false and only running methods you may need can be better for memory management (e.g brms.posterior_pred(fit)). Whenreturn_idata=Truethe function now also includesconstant_data(Issue inferencedata standardisation along univariate and multivariate models #51)posteriorandconstant_dataas idata. (Issue inferencedata standardisation along univariate and multivariate models #51)observed_dataandconstant_dataas idata (Issue inferencedata standardisation along univariate and multivariate models #51)predictionsandpredictions_constant_datain case there is newdata andposteriorandconstant_datawhen no newdata. Target variables are now suffixed with_mean. (Issue inferencedata standardisation along univariate and multivariate models #51)predictionsandpredictions_constant_datain case there is newdata andposterior_predictiveandconstant_datawhen no newdata. idata. (Issue inferencedata standardisation along univariate and multivariate models #51)predictionsandpredictions_constant_datain case there is newdata andposteriorandconstant_datawhen no newdata. Target variables are now suffixed with_linpred. (Issue inferencedata standardisation along univariate and multivariate models #51)log_likelihoodand depending onnewdata=Nonereturnsconstant_dataorpredictions_constant_data.newdatakwarg based overloads for static typechecking to automatically recognise the correct returned groups for idataThis change allows composable architectures, where the user picks only the parts of idata they need for their analysis.
Pandas & R Type Conversion
ShmDataFrameColumnsto transport DataFrames with mixed types via shared memory. Numeric and categorical columns now move between processes with zero-copy overhead, while complex object columns fall back to pickling individually.pandas.CategoricalDtype, preserving categories, integer codes, and ordered status across the main-worker boundary. (issue Pandas encoder sometimes loses categorical column info #52)Int64), nullable floats, strings during R conversion.Bug fixes and enhancements
(segfaults, BrokenPipeError, ConnectionResetError). The worker is restarted
transparently and the call raises
RWorkerCrashedError. The exceptionincludes a
recovered: boolflag indicating whether a clean worker sessionwas successfully started, allowing pipelines to distinguish retryable
crashes (
recovered=True) from hard failures (recovered=False).ShmArray; mixed object arrays gracefully fall back to pickling.This discussion was created from the release 0.3.1 - Standardized and modular InferenceData, improved memory management.
Beta Was this translation helpful? Give feedback.
All reactions