From d1d9c9f6a1c8e3f24bf5b22e3e5cf3e9092bac70 Mon Sep 17 00:00:00 2001 From: aloctavodia Date: Mon, 11 May 2026 16:33:02 +0300 Subject: [PATCH] fix log_likelihood warning --- kulprit/projection/arviz_io.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kulprit/projection/arviz_io.py b/kulprit/projection/arviz_io.py index ec068a5..2a86f5c 100644 --- a/kulprit/projection/arviz_io.py +++ b/kulprit/projection/arviz_io.py @@ -80,16 +80,16 @@ def check_idata(idata, model, rng): raise UserWarning("Incompatible model and inference data.") # check if we have the log_likelihood group - if "log_likelihood" not in idata.groups: + if "log_likelihood" not in idata.children: warnings.warn( "log_likelihood group is missing from idata, it will be computed.\n" - "To avoid this message, please run Bambi's fit method with the option " - "idata_kwargs={'log_likelihood': True}" + "To avoid this message, please compute the log likelihood with\n" + "model.compute_log_likelihood(idata)" ) model.compute_log_likelihood(idata) # check if we have the posterior_predictive group - if "posterior_predictive" not in idata.groups: + if "posterior_predictive" not in idata.children: model.predict(idata, kind="response", inplace=True, random_seed=rng) return idata