Page 1 of 1

Cobaya Error When Running Multiple Times in Jupyter Notebook?

Posted: April 15 2021
by Kris Pardo
Hi all -- I'm trying to use the evaluate sampler to just give me the chisq values at multiple model points. I want to do this via a jupyter notebook to easily loop through parameter values. However, I keep getting the following error whenever I run the cobaya.run(info) command more than once within a notebook:
[planck_2018_highl_plik.ttteee_lite] *ERROR* An unexpected error occurred in clik (possibly related to multiple simultaneous initialization, or simultaneous initialization of incompatible likelihoods (e.g. polarised vs non-polarised 'lite' likelihoods).
Is there any way to run multiple instances within a jupyter notebook like this?

Re: Cobaya Error When Running Multiple Times in Jupyter Notebook?

Posted: April 18 2021
by Antony Lewis
To just get likelihoods as points, it's easier just to use the model rather than a sampler.

Code: Select all

from cobaya.model import get_model
model = get_model(info_dict)
result = mode.logposterior(...)