how to mpi cobaya ?

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
qile zhang
Posts: 5
Joined: July 11 2022
Affiliation: Beijing Normal University

how to mpi cobaya ?

Post by qile zhang »

I know that"mpirun -np 4 python cobaya.py" can be used for parallel computing, but I would like to ask, does cobaya provide an interface to enable parallel computing in Jupyter?

in other words, can the following code be modified to perform MPI?

Code: Select all

info = {"likelihood": {"loglikeCC": log_likelihoodCC}, \
        "params": {"OmeM": {"prior": {"min": 0.0, "max": 1.0},'ref': ref[0],"latex": '\Omega_m'}, \
                    "H0": {"prior": {"min": 50, "max": 100},'ref': ref[1],"latex": 'H_0'}}, \
        "sampler": {"mcmc": {"Rminus1_stop": 0.01, "max_tries": 10000}},\
        "output": "chains_api/mcmc"
        }

updated_info, sampler = run(info,force=True) 
Antony Lewis
Posts: 1980
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: how to mpi cobaya ?

Post by Antony Lewis »

No, you'd need to run the command line cobaya-run from Jupyter.
qile zhang
Posts: 5
Joined: July 11 2022
Affiliation: Beijing Normal University

Re: how to mpi cobaya ?

Post by qile zhang »

Antony Lewis wrote: December 05 2023 No, you'd need to run the command line cobaya-run from Jupyter.
Okay, I understand. Thank you very much!
Jesus Torrado
Posts: 37
Joined: April 15 2013
Affiliation: RWTH Aachen
Contact:

Re: how to mpi cobaya ?

Post by Jesus Torrado »

Hi Qile Zhang,

There is a workaround in branch "jupyter_mpi". It makes the "run" function callable with "apply_async" in a jupyter mpi cluster, with an additional call to gather products. You just need to modify the input in the example below:

Code: Select all

info = {
    "likelihood": {
        "gaussian_mixture": {
            "means": [0.2, 0],
            "covs": [[0.1, 0.05],
                     [0.05, 0.2]],
            "derived": True}},
    "params": dict([
        ("a", {
            "prior": {"min": -0.5, "max": 3},
            "latex": r"\alpha"}),
        ("b", {
            "prior": {"dist": "norm", "loc": 0, "scale": 1},
            "ref": 0,
            "proposal": 0.5,
            "latex": r"\beta"}),
        ("derived_a", {
            "latex": r"\alpha^\prime"}),
        ("derived_b", {
            "latex": r"\beta^\prime"})]),
    "sampler": {
        "mcmc": None}}

import ipyparallel as ipp
from cobaya.run import run


def scatter_and_combine_samples(all_results):
    from mpi4py import MPI
    rank = MPI.COMM_WORLD.Get_rank()
    sampler = all_results[rank][1]
    return sampler.products(skip_samples=0.33, combined=True, to_getdist=False)


# Create MPI cluster with 4 processes
with ipp.Cluster(engines='mpi', n=4) as rc:
    view = rc.broadcast_view()
    # run Cobaya
    r = view.apply_sync(run, info)
    # consolidate products
    r_combined = view.apply_sync(scatter_and_combine_samples, r)
    upd_input = r[0][0]
    products = r_combined[0]
    
# Updated input and consolidated sampler products:
print(upd_input)
print(products)
Please, let me know if it works.

The workaround will hopefully eventually turn into a feature.
qile zhang
Posts: 5
Joined: July 11 2022
Affiliation: Beijing Normal University

Re: how to mpi cobaya ?

Post by qile zhang »

Jesus Torrado wrote: December 06 2023 Hi Qile Zhang,

There is a workaround in branch "jupyter_mpi". It makes the "run" function callable with "apply_async" in a jupyter mpi cluster, with an additional call to gather products. You just need to modify the input in the example below:

Code: Select all

info = {
    "likelihood": {
        "gaussian_mixture": {
            "means": [0.2, 0],
            "covs": [[0.1, 0.05],
                     [0.05, 0.2]],
            "derived": True}},
    "params": dict([
        ("a", {
            "prior": {"min": -0.5, "max": 3},
            "latex": r"\alpha"}),
        ("b", {
            "prior": {"dist": "norm", "loc": 0, "scale": 1},
            "ref": 0,
            "proposal": 0.5,
            "latex": r"\beta"}),
        ("derived_a", {
            "latex": r"\alpha^\prime"}),
        ("derived_b", {
            "latex": r"\beta^\prime"})]),
    "sampler": {
        "mcmc": None}}

import ipyparallel as ipp
from cobaya.run import run


def scatter_and_combine_samples(all_results):
    from mpi4py import MPI
    rank = MPI.COMM_WORLD.Get_rank()
    sampler = all_results[rank][1]
    return sampler.products(skip_samples=0.33, combined=True, to_getdist=False)


# Create MPI cluster with 4 processes
with ipp.Cluster(engines='mpi', n=4) as rc:
    view = rc.broadcast_view()
    # run Cobaya
    r = view.apply_sync(run, info)
    # consolidate products
    r_combined = view.apply_sync(scatter_and_combine_samples, r)
    upd_input = r[0][0]
    products = r_combined[0]
    
# Updated input and consolidated sampler products:
print(upd_input)
print(products)
Please, let me know if it works.

The workaround will hopefully eventually turn into a feature.
Thanks, Jesus Torrado! This seems feasible, and I found that it did indeed provide four files (mcmc1,2,3,4) correctly, bu it still looks a bit problematic, specifically as follows. Is it because I am using a personal Mac computer?

Code: Select all

Starting 4 engines with <class 'ipyparallel.cluster.launcher.MPIEngineSetLauncher'>
100%
4/4 [00:05<00:00, 5.67s/engine]
Stopping engine(s): 1701914949
engine set stopped 1701914949: {'exit_code': 1, 'pid': 30024, 'identifier': 'ipengine-1701914948-znfv-1701914949-30005'}
Stopping controller
Controller stopped: {'exit_code': 0, 'pid': 30012, 'identifier': 'ipcontroller-1701914948-znfv-30005'}
......
RecursionError: maximum recursion depth exceeded while calling a Python object
Jesus Torrado
Posts: 37
Joined: April 15 2013
Affiliation: RWTH Aachen
Contact:

Re: how to mpi cobaya ?

Post by Jesus Torrado »

Hi Qile Zhang,

Can you post here (or if it's too long in e.g. pastebin) the traceback of the error, please?
qile zhang
Posts: 5
Joined: July 11 2022
Affiliation: Beijing Normal University

Re: how to mpi cobaya ?

Post by qile zhang »

Jesus Torrado wrote: December 07 2023 Hi Qile Zhang,

Can you post here (or if it's too long in e.g. pastebin) the traceback of the error, please?

Code: Select all

{
	"name": "CompositeError",
	"message": "one or more exceptions raised in: run
[0:apply]RecursionError: maximum recursion depth exceeded while calling a Python object
[1:apply]RecursionError: maximum recursion depth exceeded while calling a Python object
[2:apply]RecursionError: maximum recursion depth exceeded while calling a Python object
[3:apply]RecursionError: maximum recursion depth exceeded while calling a Python object",
	"stack": "[0:apply]:
---------------------------------------------------------------------------
RecursionError                            Traceback (most recent call last)
File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/ipyparallel/serialize/serialize.py:119, in serialize_object(obj, buffer_threshold, item_threshold)
    116     cobj = can(obj)
    117     buffers.extend(_extract_buffers(cobj, buffer_threshold))
--> 119 buffers.insert(0, pickle.dumps(cobj, PICKLE_PROTOCOL))
    120 return buffers

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:285, in HasLogger.__getstate__(self)
    284 def __getstate__(self):
--> 285     return deepcopy(self).__dict__

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:153, in deepcopy(x, memo, _nil)
    151 copier = getattr(x, \"__deepcopy__\", None)
    152 if copier is not None:
--> 153     y = copier(memo)
    154 else:
    155     reductor = dispatch_table.get(cls)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in HasLogger.__deepcopy__(self, memo)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in <dictcomp>(.0)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:153, in deepcopy(x, memo, _nil)
    151 copier = getattr(x, \"__deepcopy__\", None)
    152 if copier is not None:
--> 153     y = copier(memo)
    154 else:
    155     reductor = dispatch_table.get(cls)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in HasLogger.__deepcopy__(self, memo)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in <dictcomp>(.0)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

    [... skipping similar frames: <dictcomp> at line 281 (1 times), HasLogger.__deepcopy__ at line 281 (1 times), deepcopy at line 153 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

    [... skipping similar frames: <dictcomp> at line 281 (2 times), HasLogger.__deepcopy__ at line 281 (2 times), deepcopy at line 153 (2 times), _deepcopy_dict at line 231 (1 times), deepcopy at line 146 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

    [... skipping similar frames: <dictcomp> at line 281 (488 times), HasLogger.__deepcopy__ at line 281 (488 times), _deepcopy_dict at line 231 (488 times), deepcopy at line 146 (488 times), deepcopy at line 153 (488 times), _reconstruct at line 271 (243 times), deepcopy at line 172 (243 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

    [... skipping similar frames: deepcopy at line 146 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

    [... skipping similar frames: <dictcomp> at line 281 (1 times), HasLogger.__deepcopy__ at line 281 (1 times), deepcopy at line 153 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:153, in deepcopy(x, memo, _nil)
    151 copier = getattr(x, \"__deepcopy__\", None)
    152 if copier is not None:
--> 153     y = copier(memo)
    154 else:
    155     reductor = dispatch_table.get(cls)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in HasLogger.__deepcopy__(self, memo)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in <dictcomp>(.0)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:206, in _deepcopy_list(x, memo, deepcopy)
    204 append = y.append
    205 for a in x:
--> 206     append(deepcopy(a, memo))
    207 return y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:265, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    263 if deep and args:
    264     args = (deepcopy(arg, memo) for arg in args)
--> 265 y = func(*args)
    266 if deep:
    267     memo[id(x)] = y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/numpy/random/_pickle.py:80, in __randomstate_ctor(bit_generator_name, bit_generator_ctor)
     61 def __randomstate_ctor(bit_generator_name=\"MT19937\",
     62                        bit_generator_ctor=__bit_generator_ctor):
     63     \"\"\"
     64     Pickling helper function that returns a legacy RandomState-like object
     65 
   (...)
     77         Legacy RandomState using the named core BitGenerator
     78     \"\"\"
---> 80     return RandomState(bit_generator_ctor(bit_generator_name))

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/numpy/random/_pickle.py:37, in __bit_generator_ctor(bit_generator_name)
     33 else:
     34     raise ValueError(str(bit_generator_name) + ' is not a known '
     35                                                'BitGenerator module.')
---> 37 return bit_generator()

File _mt19937.pyx:129, in numpy.random._mt19937.MT19937.__init__()

File bit_generator.pyx:522, in numpy.random.bit_generator.BitGenerator.__init__()

RecursionError: maximum recursion depth exceeded while calling a Python object

[1:apply]:
---------------------------------------------------------------------------
RecursionError                            Traceback (most recent call last)
File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/ipyparallel/serialize/serialize.py:119, in serialize_object(obj, buffer_threshold, item_threshold)
    116     cobj = can(obj)
    117     buffers.extend(_extract_buffers(cobj, buffer_threshold))
--> 119 buffers.insert(0, pickle.dumps(cobj, PICKLE_PROTOCOL))
    120 return buffers

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:285, in HasLogger.__getstate__(self)
    284 def __getstate__(self):
--> 285     return deepcopy(self).__dict__

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:153, in deepcopy(x, memo, _nil)
    151 copier = getattr(x, \"__deepcopy__\", None)
    152 if copier is not None:
--> 153     y = copier(memo)
    154 else:
    155     reductor = dispatch_table.get(cls)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in HasLogger.__deepcopy__(self, memo)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in <dictcomp>(.0)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:153, in deepcopy(x, memo, _nil)
    151 copier = getattr(x, \"__deepcopy__\", None)
    152 if copier is not None:
--> 153     y = copier(memo)
    154 else:
    155     reductor = dispatch_table.get(cls)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in HasLogger.__deepcopy__(self, memo)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in <dictcomp>(.0)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

    [... skipping similar frames: <dictcomp> at line 281 (1 times), HasLogger.__deepcopy__ at line 281 (1 times), deepcopy at line 153 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

    [... skipping similar frames: <dictcomp> at line 281 (2 times), HasLogger.__deepcopy__ at line 281 (2 times), deepcopy at line 153 (2 times), _deepcopy_dict at line 231 (1 times), deepcopy at line 146 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

    [... skipping similar frames: <dictcomp> at line 281 (488 times), HasLogger.__deepcopy__ at line 281 (488 times), _deepcopy_dict at line 231 (488 times), deepcopy at line 146 (488 times), deepcopy at line 153 (488 times), _reconstruct at line 271 (243 times), deepcopy at line 172 (243 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

    [... skipping similar frames: deepcopy at line 146 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

    [... skipping similar frames: <dictcomp> at line 281 (1 times), HasLogger.__deepcopy__ at line 281 (1 times), deepcopy at line 153 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:153, in deepcopy(x, memo, _nil)
    151 copier = getattr(x, \"__deepcopy__\", None)
    152 if copier is not None:
--> 153     y = copier(memo)
    154 else:
    155     reductor = dispatch_table.get(cls)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in HasLogger.__deepcopy__(self, memo)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in <dictcomp>(.0)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:206, in _deepcopy_list(x, memo, deepcopy)
    204 append = y.append
    205 for a in x:
--> 206     append(deepcopy(a, memo))
    207 return y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:265, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    263 if deep and args:
    264     args = (deepcopy(arg, memo) for arg in args)
--> 265 y = func(*args)
    266 if deep:
    267     memo[id(x)] = y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/numpy/random/_pickle.py:80, in __randomstate_ctor(bit_generator_name, bit_generator_ctor)
     61 def __randomstate_ctor(bit_generator_name=\"MT19937\",
     62                        bit_generator_ctor=__bit_generator_ctor):
     63     \"\"\"
     64     Pickling helper function that returns a legacy RandomState-like object
     65 
   (...)
     77         Legacy RandomState using the named core BitGenerator
     78     \"\"\"
---> 80     return RandomState(bit_generator_ctor(bit_generator_name))

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/numpy/random/_pickle.py:37, in __bit_generator_ctor(bit_generator_name)
     33 else:
     34     raise ValueError(str(bit_generator_name) + ' is not a known '
     35                                                'BitGenerator module.')
---> 37 return bit_generator()

File _mt19937.pyx:129, in numpy.random._mt19937.MT19937.__init__()

File bit_generator.pyx:522, in numpy.random.bit_generator.BitGenerator.__init__()

RecursionError: maximum recursion depth exceeded while calling a Python object

[2:apply]:
---------------------------------------------------------------------------
RecursionError                            Traceback (most recent call last)
File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/ipyparallel/serialize/serialize.py:119, in serialize_object(obj, buffer_threshold, item_threshold)
    116     cobj = can(obj)
    117     buffers.extend(_extract_buffers(cobj, buffer_threshold))
--> 119 buffers.insert(0, pickle.dumps(cobj, PICKLE_PROTOCOL))
    120 return buffers

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:285, in HasLogger.__getstate__(self)
    284 def __getstate__(self):
--> 285     return deepcopy(self).__dict__

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:153, in deepcopy(x, memo, _nil)
    151 copier = getattr(x, \"__deepcopy__\", None)
    152 if copier is not None:
--> 153     y = copier(memo)
    154 else:
    155     reductor = dispatch_table.get(cls)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in HasLogger.__deepcopy__(self, memo)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in <dictcomp>(.0)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:153, in deepcopy(x, memo, _nil)
    151 copier = getattr(x, \"__deepcopy__\", None)
    152 if copier is not None:
--> 153     y = copier(memo)
    154 else:
    155     reductor = dispatch_table.get(cls)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in HasLogger.__deepcopy__(self, memo)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in <dictcomp>(.0)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

    [... skipping similar frames: <dictcomp> at line 281 (1 times), HasLogger.__deepcopy__ at line 281 (1 times), deepcopy at line 153 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

    [... skipping similar frames: <dictcomp> at line 281 (2 times), HasLogger.__deepcopy__ at line 281 (2 times), deepcopy at line 153 (2 times), _deepcopy_dict at line 231 (1 times), deepcopy at line 146 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

    [... skipping similar frames: <dictcomp> at line 281 (488 times), HasLogger.__deepcopy__ at line 281 (488 times), _deepcopy_dict at line 231 (488 times), deepcopy at line 146 (488 times), deepcopy at line 153 (488 times), _reconstruct at line 271 (243 times), deepcopy at line 172 (243 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

    [... skipping similar frames: deepcopy at line 146 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

    [... skipping similar frames: <dictcomp> at line 281 (1 times), HasLogger.__deepcopy__ at line 281 (1 times), deepcopy at line 153 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:153, in deepcopy(x, memo, _nil)
    151 copier = getattr(x, \"__deepcopy__\", None)
    152 if copier is not None:
--> 153     y = copier(memo)
    154 else:
    155     reductor = dispatch_table.get(cls)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in HasLogger.__deepcopy__(self, memo)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in <dictcomp>(.0)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:206, in _deepcopy_list(x, memo, deepcopy)
    204 append = y.append
    205 for a in x:
--> 206     append(deepcopy(a, memo))
    207 return y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:265, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    263 if deep and args:
    264     args = (deepcopy(arg, memo) for arg in args)
--> 265 y = func(*args)
    266 if deep:
    267     memo[id(x)] = y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/numpy/random/_pickle.py:80, in __randomstate_ctor(bit_generator_name, bit_generator_ctor)
     61 def __randomstate_ctor(bit_generator_name=\"MT19937\",
     62                        bit_generator_ctor=__bit_generator_ctor):
     63     \"\"\"
     64     Pickling helper function that returns a legacy RandomState-like object
     65 
   (...)
     77         Legacy RandomState using the named core BitGenerator
     78     \"\"\"
---> 80     return RandomState(bit_generator_ctor(bit_generator_name))

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/numpy/random/_pickle.py:37, in __bit_generator_ctor(bit_generator_name)
     33 else:
     34     raise ValueError(str(bit_generator_name) + ' is not a known '
     35                                                'BitGenerator module.')
---> 37 return bit_generator()

File _mt19937.pyx:129, in numpy.random._mt19937.MT19937.__init__()

File bit_generator.pyx:522, in numpy.random.bit_generator.BitGenerator.__init__()

RecursionError: maximum recursion depth exceeded while calling a Python object

[3:apply]:
---------------------------------------------------------------------------
RecursionError                            Traceback (most recent call last)
File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/ipyparallel/serialize/serialize.py:119, in serialize_object(obj, buffer_threshold, item_threshold)
    116     cobj = can(obj)
    117     buffers.extend(_extract_buffers(cobj, buffer_threshold))
--> 119 buffers.insert(0, pickle.dumps(cobj, PICKLE_PROTOCOL))
    120 return buffers

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:285, in HasLogger.__getstate__(self)
    284 def __getstate__(self):
--> 285     return deepcopy(self).__dict__

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:153, in deepcopy(x, memo, _nil)
    151 copier = getattr(x, \"__deepcopy__\", None)
    152 if copier is not None:
--> 153     y = copier(memo)
    154 else:
    155     reductor = dispatch_table.get(cls)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in HasLogger.__deepcopy__(self, memo)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in <dictcomp>(.0)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:153, in deepcopy(x, memo, _nil)
    151 copier = getattr(x, \"__deepcopy__\", None)
    152 if copier is not None:
--> 153     y = copier(memo)
    154 else:
    155     reductor = dispatch_table.get(cls)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in HasLogger.__deepcopy__(self, memo)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in <dictcomp>(.0)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

    [... skipping similar frames: <dictcomp> at line 281 (1 times), HasLogger.__deepcopy__ at line 281 (1 times), deepcopy at line 153 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

    [... skipping similar frames: <dictcomp> at line 281 (2 times), HasLogger.__deepcopy__ at line 281 (2 times), deepcopy at line 153 (2 times), _deepcopy_dict at line 231 (1 times), deepcopy at line 146 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

    [... skipping similar frames: <dictcomp> at line 281 (488 times), HasLogger.__deepcopy__ at line 281 (488 times), _deepcopy_dict at line 231 (488 times), deepcopy at line 146 (488 times), deepcopy at line 153 (488 times), _reconstruct at line 271 (243 times), deepcopy at line 172 (243 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

    [... skipping similar frames: deepcopy at line 146 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

    [... skipping similar frames: <dictcomp> at line 281 (1 times), HasLogger.__deepcopy__ at line 281 (1 times), deepcopy at line 153 (1 times)]

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:153, in deepcopy(x, memo, _nil)
    151 copier = getattr(x, \"__deepcopy__\", None)
    152 if copier is not None:
--> 153     y = copier(memo)
    154 else:
    155     reductor = dispatch_table.get(cls)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in HasLogger.__deepcopy__(self, memo)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/cobaya/log.py:281, in <dictcomp>(.0)
    279 def __deepcopy__(self, memo=None):
    280     new = (lambda cls: cls.__new__(cls))(self.__class__)
--> 281     new.__dict__ = {k: deepcopy(v) for k, v in self.__dict__.items() if k != \"log\"}
    282     return new

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:206, in _deepcopy_list(x, memo, deepcopy)
    204 append = y.append
    205 for a in x:
--> 206     append(deepcopy(a, memo))
    207 return y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    269 if state is not None:
    270     if deep:
--> 271         state = deepcopy(state, memo)
    272     if hasattr(y, '__setstate__'):
    273         y.__setstate__(state)

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
    144 copier = _deepcopy_dispatch.get(cls)
    145 if copier is not None:
--> 146     y = copier(x, memo)
    147 else:
    148     if issubclass(cls, type):

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
    229 memo[id(x)] = y
    230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
    232 return y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
    170                 y = x
    171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
    174 # If is its own copy, don't memoize.
    175 if y is not x:

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/copy.py:265, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
    263 if deep and args:
    264     args = (deepcopy(arg, memo) for arg in args)
--> 265 y = func(*args)
    266 if deep:
    267     memo[id(x)] = y

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/numpy/random/_pickle.py:80, in __randomstate_ctor(bit_generator_name, bit_generator_ctor)
     61 def __randomstate_ctor(bit_generator_name=\"MT19937\",
     62                        bit_generator_ctor=__bit_generator_ctor):
     63     \"\"\"
     64     Pickling helper function that returns a legacy RandomState-like object
     65 
   (...)
     77         Legacy RandomState using the named core BitGenerator
     78     \"\"\"
---> 80     return RandomState(bit_generator_ctor(bit_generator_name))

File ~/Anaconda/anaconda3/envs/Cosmology/lib/python3.11/site-packages/numpy/random/_pickle.py:37, in __bit_generator_ctor(bit_generator_name)
     33 else:
     34     raise ValueError(str(bit_generator_name) + ' is not a known '
     35                                                'BitGenerator module.')
---> 37 return bit_generator()

File _mt19937.pyx:129, in numpy.random._mt19937.MT19937.__init__()

File bit_generator.pyx:522, in numpy.random.bit_generator.BitGenerator.__init__()

RecursionError: maximum recursion depth exceeded while calling a Python object
"
}
Post Reply