Skip to content

Commit

Permalink
Add tqdm Progress Bar for model.predict()
Browse files Browse the repository at this point in the history
  • Loading branch information
jgyasu committed Jan 22, 2025
1 parent 6346897 commit 5899546
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bambi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import pymc as pm
import pandas as pd
import numpy as np
from tqdm import tqdm

from arviz.plots import plot_posterior

Expand Down Expand Up @@ -995,7 +996,7 @@ def _compute_likelihood_params(
hsgp_dict = {} # To store the HSGP contributions (they are added to the posterior dataset)
response_dim = "__obs__"

for name, component in self.distributional_components.items():
for name, component in tqdm(self.distributional_components.items()):
var_name = component.alias if component.alias else name
means_dict[var_name] = component.predict(
idata, data, include_group_specific, hsgp_dict, sample_new_groups
Expand Down

0 comments on commit 5899546

Please sign in to comment.