Open tilmantroester opened 4 months ago
@tilmantroester , should this have been solved by #1160 ?
Not exactly. Trying to use write_yaml
with complex types for Cosmology
arguments now raises an error instead of silently ignoring these arguments. But you still can't round-trip using read_yaml
and write_yaml
if an argument to Cosmology
isn't something like a float
or str
.
OK, I see. So I guess we'd want some kind of _repr_
for the relevant CCL classes that contains enough information to recreate them from scratch.
write_yaml
currently ignores thebaryonic_effects
andmg_parametrization
arguments toCosmology
, since it only uses what's inself._params_init_kwargs
andself._config_init_kwargs
. It also loses the information ontransfer_function
andmatter_power_spectrum
if they are emulators. That is, a roundtrip ofwrite_yaml
andread_yaml
doesn't recover the sameCosmology
object.