Skip to main content

No project description provided

Project description

bilby-numpyro

Sampler plugin for using numpyro samplers with Bilby

bilby-numpyro is a sampler plugin for using numpyro samplers with Bilby likelihoods and priors. Any likelihood that uses only JAX JIT-compilable functions/classes works automatically.

Usage

The sampler should always be given as numpyro regardless of which sampler (e.g., HMC, NUTS) is actually being used. The sampler is specified with sampler_name and any sampler keyword arguments should be passed in the usual way to bilby.core.sampler.run_sampler for example

run_sampler(
    ...,
    sampler="numpyro",
    sampler_name="NUTS",
    num_warmup=500,
    num_samples=1000,
)

This has not been tested with numpyro parallelisation.

Limitations

The likelihood class you use should be JIT compilable with JAX. Generally, this will be the case if you use jax.numpy and jax.scipy instead of numpy/scipy.

Some Bilby priors have direct equivalents in numpyro and so we use those automatically. You will see logged warnings if a prior is not available and a Uniform prior over the same range will be used instead.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bilby_numpyro-0.0.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

bilby_numpyro-0.0.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file bilby_numpyro-0.0.1.tar.gz.

File metadata

  • Download URL: bilby_numpyro-0.0.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for bilby_numpyro-0.0.1.tar.gz
Algorithm Hash digest
SHA256 82dfe7b085c3b32374a76d13e1839b666ce6369e8a9138fc323e0497183b1af7
MD5 cc6bfb2f68b4d5b6a7fe486cfb774bdc
BLAKE2b-256 fe86ff16d946a1b6570099f2c67ff9c3a0e8e7a0e50338f9448c560b3ee02e83

See more details on using hashes here.

Provenance

The following attestation bundles were made for bilby_numpyro-0.0.1.tar.gz:

Publisher: deploy-to-pypi.yml on ColmTalbot/bilby-numpyro

Attestations:

File details

Details for the file bilby_numpyro-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for bilby_numpyro-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 257180e8b7faa583371c467525d31769703ff6474b933065377d2372e407d753
MD5 986c531740cad682736cb37b2092f37f
BLAKE2b-256 d7896df5ce87d0f689980bb9f349fd72e18bf94a70145439ffb26b4e578c0222

See more details on using hashes here.

Provenance

The following attestation bundles were made for bilby_numpyro-0.0.1-py3-none-any.whl:

Publisher: deploy-to-pypi.yml on ColmTalbot/bilby-numpyro

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page