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

Progress bar for model.predict #818

Open
kddubey opened this issue Jun 15, 2024 · 4 comments
Open

Progress bar for model.predict #818

kddubey opened this issue Jun 15, 2024 · 4 comments

Comments

@kddubey
Copy link
Contributor

kddubey commented Jun 15, 2024

Hello,

Thank you for this excellent package!

model.predict takes up to 30 minutes for my model. Is there a way to add a progress bar?

@GStechschulte
Copy link
Collaborator

Thanks for raising the issue. A progress bar should be enabled by default. What version of Bambi do you have installed? Additionally, are you running your code in Juypter Notebooks or Python scripts?

@kddubey
Copy link
Contributor Author

kddubey commented Jun 16, 2024

I have 0.13.0 installed. It doesn't appear if I run it in a script or in a Jupyter Notebook. I do always see a progress bar for model.fit

@GStechschulte
Copy link
Collaborator

GStechschulte commented Jun 17, 2024

Ahh, apologies for the misinterpretation of the issue from my side. If you wanted to add a progress bar, it would go in the .predict method somewhere.

Although, this method also calls other methods such as compute_likelihood_params where we iterate over the components of the Bambi model and make predictions for each. Additional functions are called if you want posterior predictive samples. At first glance, it seems that putting the progress bar in compute_likelihood_params would provide the most informative progress bar since we know the elements we are iterating over, etc.

For model.fit, Bambi "inherits" the progress bar from PyMC (which I think uses the tqdm progress bar? Or was this changed to the fastprogress bar?) If you want to attempt add this and put up a PR, I would be more than happy to review it 😄

@tomicapretto any thoughts on adding a progress bar here?

@tomicapretto
Copy link
Collaborator

Hi!

We need to make a new release soon and it should probably help on many fronts.

Still, I think we don't have a progress bar for the Model.predict() method. It would be definitely nice to have one. I'm still not sure which parts of the code we need to modify, but I'll look into it. For now, adding a 'feature request' label here.

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

3 participants