Skip to content

0.13.0 release

Latest
Compare
Choose a tag to compare
@C-bowman C-bowman released this 03 Dec 02:09
· 2 commits to master since this release

Minimum python version increase

  • The minimum python version for inference-tools has been increased to 3.9.

Backwards-incompatible changes in inference.mcmc

  • Specification of parameter bounds has been standardised across HamiltonianChain, PcaChain and EnsembleSampler. On initialisation they now each have an optional bounds keyword argument, which takes an instance of inference.mcmc.Bounds or a sequence of two numpy.ndarray. Depending on which sampler is being used, the name of the keyword argument and/or the format in which the bounds are specified may have changed in this release, which will break code written for previous releases.
  • Standardised the naming of some instance attributes across the MCMC samplers. These attributes typically would not be accessed directly by a user, but the changes also affect how chain data are saved and loaded, meaning that chain data saved using previous releases may not load correctly.
  • Standardised the returned type of the get_probabilities, get_parameter and get_sample methods of MCMC samplers to be a numpy.ndarray. Previously, these methods returned either a list or a numpy.ndarray depending on which sampler was used.
  • Removed the burn and thin instance attributes of MCMC samplers used to set global burn and thin values. This means burn and thin values must now be passed explicitly to MarkovChain methods, but avoids potentially error-prone behavior of burning / thinning being applied implicitly even when the burn and thin kwargs are not specified. burn and thin have been added to the MarkovChain base class as properties which raise an error when accessed or set. This will prevent bugs where the burn / thin attributes are set but have no effect as they are no longer used by any methods.

Other changes

  • Converted MarkovChain to an abstract base-class for MCMC samplers. All sampler classes now inherit from MarkovChain, so it can be used for type checking / hinting when expecting one of the samplers as an input. Some additional standardisation across the samplers has allowed more functionality to be moved from individual classes to the base class, improving code re-use.
  • Improved type-hinting across various modules.
  • All project meta-data has been moved to the pyproject.toml, and setup.cfg has been removed.