Releases: CobayaSampler/cobaya
v3.2.2
Version bump v3.2.2
v3.2.1
A not-so-minor release containing the following user-facing changes, among others:
-
Updated BOSS DR16 (thanks Pablo Lemos!), BICEP-Keck 2021 (thanks Dominic Beck!) PolyChord v1.20.1 (thanks Will Handley!), CLASS v3.2 (thanks Julien Lesgourgues and Nils Schöneberg!), CAMB (always last master commit) and (un-)official SPT likelihoods (external, thanks Xavier Garrido!). Run
cobaya-install cosmo --upgrade
to download them! -
Added a convenient
--minimize
flag to cobaya-run: just re-run your previous MCMC/PolyChord runs with this flag to start a minimization process starting from the best point of your previous sample. -
File locking was introduced in a previous version as a way to prevent parallel runs (e.g. due non-working MPI installs) to overwrite each other, but it may cause problems in some systems. To disable it you can now set the environment variable
COBAYA_USE_FILE_LOCKING=false
. -
CAMB and CLASS: added
Omega_b|cdm|nu_massive(z)
andangular_diameter_distance_2
.Pk_interpolator
can now extrapolate towards low k usingextrap_kmin
. -
CAMB and CLASS: added
ignore_obsolete
option to be able to run with your modified older CAMB and CLASS versions. -
CAMB: Support setting individual Accuracy parameters, e.g.
Accuracy.AccurateBB
. -
CLASS: added
sigmaR(z)
,sigma8(z)
,fsgima8(z)
and Weyl potential power spectrum (were already in CAMB). Added direct access to some CLASS computation products, via new requisitesCLASS_[background|thermodynamics|primordial|perturbations|sources]
. Changed defaultnon_linear
tohmcode
(wasnone
). -
Many small fixes to code and docs, thanks to Caterina Umilta, Paolo Campeti, Lukas Hergt, Will Handley, @valadur19, Adam Ormondroyd, Chris Walter, Jack Runburg and Paul Shah!
Don't forget to run cobaya-install cosmo --upgrade
after upgrading to Cobaya 3.2 to get the latest versions of all codes and likelihoods!
v3.1.1
v3.1
Numerous changes for more general dependencies and parameterizations, mpi robustness and post-processing.
Fixes a bug in mcmc sampling with drag: True that gave incorrect results (but very small error when many dragging steps)
General
- updated and added documentation for cobaya-run-job; added cobaya-running-jobs and cobaya-delete-jobs
- Allow for more general dependencies between input parameters, derived parameters and likelihood/theory/prior inputs
- run, post and get_model can now all take inputs from a dictionary, yaml text or yaml
filename - Support resuming of a completed run with changed convergence parameters
- run has optional arguments to set debug, force, output, etc settings
- More input and output typing for easier static error detection; added cobaya.typing for static checking of input dictionaries using TypedDict when available
- Refactoring of cobaya.conventions to remove most string literals and rename non-private constants starting with _
- Uses GetDist 1.2.2+ which fixes sign loading the logposterior value from Cobaya
collection - Optimized calculation of Gaussian 1D priors
- run settings saved to ".updated.dill_pickle" pickle file in cases where callable/class
content cannot be preserved in yaml (install "dill") - File locks to avoid overwriting results accidentally from multiple non-MPI processes
- Commonly-used classes can now be loaded simply using "from cobaya import Likelihood, InputDict, Theory, ..." etc., or call e.g. cobaya.run(..)
- run and post return NamedTuples (same content as before)
- Fixed handling of "type" in external likelihood functions
- bib_script and doc_script can now be called programmatically
- MPI support refactored using decorators
- requirements can now also be specified as list of name, dictionary tuples (in case name needs to be repeated)
- renamed Collection -> SampleCollection (to avoid confusion with general typing.Collection)
- allow loading of CamelCase classes from module with lowercase name. Class "file_base_name" attribute to
optionally specify the root name for yaml and bib files. Some supplied classes renamed. - allow input likelihoods and theories to be instances (as well as classes); [provisional]
MCMC
- Fixed bug with "drag: True" that gave wrong results
- MPI reworked, now avoids ending and error deadlocks, and synchronizing exceptions
(raising OtherProcessError on non-excepting processes) - Random number generation now using numpy 1.17 generators and MPI seeds generated using SeedSequence
(note MPI runs generally not reproducible with fixed seed due to thead timing/asynchronous mpi exchanges) - Overhead reduced by at least 40%, thanks to caching in Collection
- Optimization of derived parameter output (for dragging, not computed at each dragging step)
- Some refactoring/simplification to pass LogPosterior instances more
- Reported acceptance rate is now only over last half chains (for MPI), or skipping first Rminus1_single_split fraction
- When no covamt or 'prosposal' setting for a parameter, the fallback proposal width is now scaled (narrower) from the ref or prior variance
Post-processing
- post function reworked to support MPI, thinning, and more general parameter-dependence
operations - On one process operating on list of samples outputs consistent list of samples rather
than concatenating - Output is produced incrementally, so terminated jobs still produce valid output
- No unnecessary theory recalculations
- Support for loading from CosmoMC/Getdist-format chains.
- Function in cobaya.cosmo_input.convert_cosmomc to general Cobaya-style info from
existing CosmoMC chains (some likelihood/theory information may have to be added if you
are recalculating things)
Minimize
PyBOBYQA
updated to 1.2, and quieter by default.- 'best_of' parameter to probe different random starting positions (replacing seek_global_minimum for non-MPI)
- 'rhobeg' parameter larger to avoid odd hangs
Cosmology:
- Added CamSpec 2021 Planck high-l likelihoods (based on legacy maps, not NPIPE; thanks Erik Rosenberg)
- Added Riess et al H0 constraint (H0.riess2020Mb) in terms of magnitude rather than directly on H0
(use combined with sn.pantheon with use_abs_mag: True; thanks Pablo Lemos) - Install updated Planck clik code (3.1)
Tests
- Added MPI tests and markers, synchronize errors to avoid pytest hangs on mpi errors
- Added new fast but more realistic running, resuming and post tests with and without mpi
- Fixed some randomized test inputs for more reliable running
- drag: True running test
- Coverage reporting added to Travis
- More useful traceback and console log when error raised running pytest
- added COBAYA_DEBUG env variable that can be set to force debug output (e.g. set in travis for failed build rerun)