Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable saving samples to hard drive for Approximation.sample, sample_prior_predictive, and sample_posterior_predictive #3550

Closed
twolodzko opened this issue Jul 18, 2019 · 3 comments

Comments

@twolodzko
Copy link

twolodzko commented Jul 18, 2019

At this moment Approximation.sample, sample_posterior_predictive, and sample_posterior_predictive methods do not have trace parameters (save to trace) as pm.sample. They are hardcoded to gather the results as a large array in RAM. When sampling from large datasets (many parameters, many datapoints) the returning arrays grow in RAM and at some point become unusable, eventually leading to MemoryErrors. This could be solved by enabling user to choose way of storing the results on hard drive rather then memory, using the MultiTrace functionality.

@twolodzko twolodzko changed the title Add trace parameter to Approximation.sample, sample_prior_predictive, and sample_posterior_predictive Add trace parameter to Approximation.sample and sample_prior_predictive Jul 18, 2019
@twolodzko twolodzko changed the title Add trace parameter to Approximation.sample and sample_prior_predictive Enable saving samples to hard drive for Approximation.sample, sample_prior_predictive, and sample_posterior_predictive Jul 18, 2019
@fonnesbeck
Copy link
Member

First part finished with merge of #3557

@kc611
Copy link
Contributor

kc611 commented Jan 28, 2021

I think in current master sample_posterior_predictive and similar methods do have trace parameters. So I guess this feature request is already statisfied.

@ricardoV94
Copy link
Member

Closing in favor of #5371

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants