Cobaya Error When Running Multiple Times in Jupyter Notebook?

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Kris Pardo
Posts: 3
Joined: November 30 2020
Affiliation: Jet Propulsion Lab

Cobaya Error When Running Multiple Times in Jupyter Notebook?

Post by Kris Pardo » April 15 2021

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?

Antony Lewis
Posts: 1719
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

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

Post by Antony Lewis » April 18 2021

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(...)

Post Reply