Skip to content

Releases: pyro-ppl/numpyro

0.2.3

05 Dec 06:42
Compare
Choose a tag to compare

Patches 0.2.2 with the following changes:

  • restore compatibility with python 3.7 for mcmc.
  • impose cache size limit in MCMC utilities.

0.2.2

04 Dec 20:49
Compare
Choose a tag to compare

Breaking changes

  • Minor interface changes to MCMC utility functions. All experimental interfaces are marked as such in the documentation.

New Features

  • A numpyro.factor primitive that adds an arbitrary log probability factor to a probabilistic model.

Enhancements and Bug Fixes

  • Addressed a bug where multiple invocations of MCMC.run would wrongly use the previously cached arguments.
  • MCMC reuses compiled model code whenever possible. e.g. when re-running with different but same sized model arguments.
  • Ability to reuse the same warmup state for subsequent MCMC runs using MCMC.warmup.

0.2.1

01 Nov 22:13
Compare
Choose a tag to compare

Breaking changes

  • Code reorganization - numpyro.mcmc is moved to numpyro.infer.mcmc but all major classes are exposed in the numpyro.infer module.
  • rng argument to many classes and the seed handler has been more accurately renamed to rng_key.
  • Deprecated functions that formed the old interface like mcmc and svi have been removed.

New Features

Enhancements and Bug Fixes

0.2.0

08 Sep 07:15
Compare
Choose a tag to compare

Highlights

  • Interface Changes to MCMC and SVI: The interface for inference algorithms have been simplified, and is much closer to Pyro. See MCMC and SVI.
  • Multi-chain Sampling for MCMC: There are three options provided: parallel (default), sequential, and vectorized. Currently, parallel method is the fastest among the three.

Breaking changes

  • The primitives param, sample are moved to primitives module. All primities are exposed in numpyro namespace.

New Features

MCMC

  • In MCMC, we have the option to collect fields other than just the samples such as number of steps or step size, using collect_fields arg in MCMC.run. This can be useful when gathering diagnostic information during debugging.
  • diverging field is added to HMCState. This field is useful to detect divergent transitions.
  • Support improper prior through param primitives. e.g.
def model(data):
    loc = numpyro.param('loc', 0.)
    scale = numpyro.param('scale', 0.5, constraint=constraints.positive)
    return numpyro.sample('obs', dist.Normal(loc, scale), obs=data)

Primitives / Effect Handlers

  • module primitive to support JAX style neural network. See VAE example.
  • condition handler for conditioning sample sites to observed data.
  • scale handler for rescaling the log probability score.

Optimizers

JAX optimizers are wrapped in the numpyro.optim module, so that the optimizers can be passed in directly to SVI.

Distributions

Utilities

  • predictive utility for vectorized predictions from the posterior predictive distribution.

Autoguides

An experimental autoguide module, with more autoguides to come.

New Examples

Enhancements and Bug Fixes

  • Improve compiling time in MCMC.
  • Better PRNG splitting mechanism in SVI (to avoid reusing PRNG keys).
  • Correctly handle models with dynamically changing distribution constraints. e.g.
def model():
    x = numpyro.sample('x', dist.Uniform(0., 2.))
    y = numpyro.sample('y', dist.Uniform(0., x))  # y's support is not static.
  • Fixes step_size getting NaN in MCMC when it becomes extremely small.

First Public Release

01 Jun 04:14
Compare
Choose a tag to compare

Refer to the README for details.