Generic API for dispatch to Pyro backends.
Project description
Pyro API
Generic API for modeling and inference for dispatch to different Pyro backends.
Testing
For testing API compatibility on different backends, install pytest and other test dependencies that includes backends like funsor and numpyro and run the test suite:
pip install -e .[test]
pytest -vs
This library has no dependencies and can easily be installed for testing your particular Pyro backend
implementation. You can use the following pattern and test your backend on models in the pyroapi.testing
module.
from pyro_api.dispatch import pyro_backend
from pyro_api.testing import MODELS
# Register backend
with pyro_backend(handlers='my_backend.handlers',
distributions='my_backend.distributions',
...):
# Test on models in pyro_api.testing
for model in MODELS:
f = MODELS[model]()
model, model_args = f['model'], f.get('model_args', ())
model(*model_args)
... # further testing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyro-api-0.1.2.tar.gz.
File metadata
- Download URL: pyro-api-0.1.2.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1b900d9580aa1c2fab3b123ab7ff33413744da7c5f440bd4aadc4d40d14d920
|
|
| MD5 |
da74f6ea59d90eef11f7c9b649bda485
|
|
| BLAKE2b-256 |
25d7a0812f5c16b0d4464f80a64a44626c5fe200098070be0f32436dbb662775
|
File details
Details for the file pyro_api-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pyro_api-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10e0e42e9e4401ce464dab79c870e50dfb4f413d326fa777f3582928ef9caf8f
|
|
| MD5 |
4a1af8776125b2b1ee1f6c4b52b1fb6f
|
|
| BLAKE2b-256 |
fc81957ae78e6398460a7230b0eb9b8f1cb954c5e913e868e48d89324c68cec7
|