Skip to content

Releases: CobayaSampler/cobaya

v3.1.1

26 Jul 08:15
Compare
Choose a tag to compare
  • Changes for compatibility with Pandas 1.3 (which broke convergence testing amongst other things).
  • Updated docs with list of external likelihood codes, and to help avoid issues with PySide install
  • Minor fixes in BAO/SN likelihoods

v3.1

04 Jun 16:06
Compare
Choose a tag to compare

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)