You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have successfully installed mflike, however when I run the example - cobaya-run examples/mflike_example.yaml -p ../packages, I receive the following error:
Traceback (most recent call last):
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/bin/cobaya-run", line 8, in <module>
sys.exit(run_script())
~~~~~~~~~~^^
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/cobaya/run.py", line 198, in run_script
run(info, **arguments.__dict__)
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/cobaya/run.py", line 132, in run
sampler = sampler_class(updated_info["sampler"][sampler_name],
model, out, name=sampler_name,
packages_path=info.get("packages_path"))
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/cobaya/sampler.py", line 279, in __init__
self.initialize()
~~~~~~~~~~~~~~~^^
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/cobaya/samplers/mcmc/mcmc.py", line 167, in initialize
initial_point, results = self.model.get_valid_point(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
max_tries=int(min(self.max_tries.value, 1e7)),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
random_state=self._rng
^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/cobaya/model.py", line 616, in get_valid_point
results = self.logposterior(initial_point)
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/cobaya/model.py", line 558, in logposterior
like = self._loglikes_input_params(input_params,
return_derived=return_derived,
cached=cached, make_finite=make_finite)
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/cobaya/model.py", line 378, in _loglikes_input_params
compute_success = component.check_cache_and_compute(
params, want_derived=need_derived,
dependency_params=depend_list, cached=cached)
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/cobaya/theory.py", line 253, in check_cache_and_compute
if self.calculate(state, want_derived, **params_values_dict) is False:
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/mflike/foreground.py", line 432, in calculate
state["fg_totals"] = self.get_foreground_model_totals(**params_values_dict)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/mflike/foreground.py", line 443, in get_foreground_model_totals
model = self._get_foreground_model_arrays(params_values_dict)
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/mflike/foreground.py", line 556, in _get_foreground_model_arrays
return super()._get_foreground_model_arrays(fg_params, ell=ell)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/mflike/foreground.py", line 270, in _get_foreground_model_arrays
model["tt", "kSZ"] = fg_params["a_kSZ"] * self.ksz(
~~~~~~~~^
{"nu": self.bandint_freqs_T}, {"ell": ell, "ell_0": ell_0}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/fgspectra/model.py", line 111, in __call__
return self.eval(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/fgspectra/cross.py", line 136, in eval
f_nu = self._sed(**sed_kwargs)
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/fgspectra/model.py", line 111, in __call__
return self.eval(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/fgspectra/frequency.py", line 324, in eval
return _bandpass_integration()
File "/home/c.c24054153/.conda/envs/boltzmannbenchmarks/lib/python3.13/site-packages/fgspectra/frequency.py", line 84, in _bandpass_integration
del kw["self"] # self was in the locals but is not a keyword argument
~~^^^^^^^^
TypeError: cannot remove variables from FrameLocalsProxy
I think this is caused by different versions of fgspectra
The text was updated successfully, but these errors were encountered:
I haven't be able to reproduce your error on a fresh install of mflike (see steps below). We need fgspectra version to be at least 1.3.0 so if you have an older version, I think when installing mflike, the system should upgrade fgspectra. In any case, you can try to upgrade it by doing python -m pip install -U fgspectra.
Here are the steps I did using a virtual env.
cd /tmp
python -m venv pyenv
source pyenv/bin/activate
python -m pip install mflike
wget https://raw.githubusercontent.com/simonsobs/LAT_MFLike/refs/heads/master/examples/mflike_example.yaml
# Source again to make sure we use the correct cobaya bins
source pyenv/bin/activate
cobaya-install -p packages mflike_example.yaml
cobaya-run -p packages mflike_example.yaml
I have successfully installed mflike, however when I run the example -
cobaya-run examples/mflike_example.yaml -p ../packages
, I receive the following error:I think this is caused by different versions of fgspectra
The text was updated successfully, but these errors were encountered: