Error in the excution

model_dict = dict(zip([“model_0”, “model_1”, “model_2”], traces))
comp = az.compare(model_dict)
comp
After these three lines I received another error knowing that I reproduced the model proposed by PyMC documentation:

TypeError Traceback (most recent call last)
File ~\anaconda3\envs\pymc_env\Lib\site-packages\arviz\stats\stats.py:448, in _calculate_ics(compare_dict, scale, ic, var_name)
447 try:
→ 448 compare_dict[name] = ic_func(
449 convert_to_inference_data(dataset),
450 pointwise=True,
451 scale=scale,
452 var_name=var_name,
453 )
454 except Exception as e:

File ~\anaconda3\envs\pymc_env\Lib\site-packages\arviz\stats\stats.py:766, in loo(data, pointwise, var_name, reff, scale)
765 inference_data = convert_to_inference_data(data)
→ 766 log_likelihood = _get_log_likelihood(inference_data, var_name=var_name)
767 pointwise = rcParams[“stats.ic_pointwise”] if pointwise is None else pointwise

File ~\anaconda3\envs\pymc_env\Lib\site-packages\arviz\stats\stats_utils.py:425, in get_log_likelihood(idata, var_name)
424 if not hasattr(idata, “log_likelihood”):
→ 425 raise TypeError(“log likelihood not found in inference data object”)
426 if var_name is None:

TypeError: log likelihood not found in inference data object

The above exception was the direct cause of the following exception:

TypeError Traceback (most recent call last)
File ~\anaconda3\envs\pymc_env\Lib\site-packages\arviz\stats\stats.py:177, in compare(compare_dict, ic, method, b_samples, alpha, seed, scale, var_name)
176 try:
→ 177 (ics_dict, scale, ic) = _calculate_ics(compare_dict, scale=scale, ic=ic, var_name=var_name)
178 except Exception as e:

File ~\anaconda3\envs\pymc_env\Lib\site-packages\arviz\stats\stats.py:455, in _calculate_ics(compare_dict, scale, ic, var_name)
454 except Exception as e:
→ 455 raise e.class(
456 f"Encountered error trying to compute {ic} from model {name}."
457 ) from e
458 return (compare_dict, scale, ic)

TypeError: Encountered error trying to compute loo from model model_0.

The above exception was the direct cause of the following exception:

TypeError Traceback (most recent call last)
Cell In[8], line 2
1 model_dict = dict(zip([“model_0”, “model_1”, “model_2”], traces))
----> 2 comp = az.compare(model_dict)
3 comp

File ~\anaconda3\envs\pymc_env\Lib\site-packages\arviz\stats\stats.py:179, in compare(compare_dict, ic, method, b_samples, alpha, seed, scale, var_name)
177 (ics_dict, scale, ic) = _calculate_ics(compare_dict, scale=scale, ic=ic, var_name=var_name)
178 except Exception as e:
→ 179 raise e.class(“Encountered error in ELPD computation of compare.”) from e
180 names = list(ics_dict.keys())
181 if ic == “loo”:

TypeError: Encountered error in ELPD computation of compare.