pyro-api


Namepyro-api JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/pyro-ppl/pyro-api
SummaryGeneric API for dispatch to Pyro backends.
upload_time2020-05-15 16:17:41
maintainer
docs_urlNone
authorUber AI Labs
requires_python
licenseApache License 2.0
keywords probabilistic machine learning bayesian statistics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Build Status](https://travis-ci.com/pyro-ppl/pyro-api.svg?branch=master)](https://travis-ci.com/pyro-ppl/pyro-api)
[![Latest Version](https://badge.fury.io/py/pyro-api.svg)](https://pypi.python.org/pypi/pyro-api)
[![Documentation Status](https://readthedocs.org/projects/pyro-api/badge/?version=latest)](http://pyro-api.readthedocs.io/en/latest/?badge=master)

# 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](https://github.com/pyro-ppl/funsor) and [numpyro](https://github.com/pyro-ppl/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.

```python
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
``` 



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pyro-ppl/pyro-api",
    "name": "pyro-api",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "probabilistic machine learning bayesian statistics",
    "author": "Uber AI Labs",
    "author_email": "npradhan@uber.com",
    "download_url": "https://files.pythonhosted.org/packages/25/d7/a0812f5c16b0d4464f80a64a44626c5fe200098070be0f32436dbb662775/pyro-api-0.1.2.tar.gz",
    "platform": "",
    "description": "[![Build Status](https://travis-ci.com/pyro-ppl/pyro-api.svg?branch=master)](https://travis-ci.com/pyro-ppl/pyro-api)\n[![Latest Version](https://badge.fury.io/py/pyro-api.svg)](https://pypi.python.org/pypi/pyro-api)\n[![Documentation Status](https://readthedocs.org/projects/pyro-api/badge/?version=latest)](http://pyro-api.readthedocs.io/en/latest/?badge=master)\n\n# Pyro API\n\nGeneric API for modeling and inference for dispatch to different Pyro backends.\n\n----------------------------------------------------------------------------------------------------\n\n## Testing\n\nFor testing API compatibility on different backends, install pytest and other test dependencies that includes backends like [funsor](https://github.com/pyro-ppl/funsor) and [numpyro](https://github.com/pyro-ppl/numpyro) and run the test suite:\n\n```\npip install -e .[test]\npytest -vs\n```\n\nThis library has no dependencies and can easily be installed for testing your particular Pyro backend\nimplementation. You can use the following pattern and test your backend on models in the `pyroapi.testing`\nmodule.\n\n```python\nfrom pyro_api.dispatch import pyro_backend\nfrom pyro_api.testing import MODELS\n\n\n# Register backend\nwith pyro_backend(handlers='my_backend.handlers', \n                  distributions='my_backend.distributions',\n                  ...):\n\n    # Test on models in pyro_api.testing\n    for model in MODELS:\n        f = MODELS[model]()\n        model, model_args = f['model'], f.get('model_args', ())\n        model(*model_args) \n        ... # further testing\n``` \n\n\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Generic API for dispatch to Pyro backends.",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/pyro-ppl/pyro-api"
    },
    "split_keywords": [
        "probabilistic",
        "machine",
        "learning",
        "bayesian",
        "statistics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fc81957ae78e6398460a7230b0eb9b8f1cb954c5e913e868e48d89324c68cec7",
                "md5": "4a1af8776125b2b1ee1f6c4b52b1fb6f",
                "sha256": "10e0e42e9e4401ce464dab79c870e50dfb4f413d326fa777f3582928ef9caf8f"
            },
            "downloads": -1,
            "filename": "pyro_api-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4a1af8776125b2b1ee1f6c4b52b1fb6f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11981,
            "upload_time": "2020-05-15T16:17:40",
            "upload_time_iso_8601": "2020-05-15T16:17:40.492076Z",
            "url": "https://files.pythonhosted.org/packages/fc/81/957ae78e6398460a7230b0eb9b8f1cb954c5e913e868e48d89324c68cec7/pyro_api-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25d7a0812f5c16b0d4464f80a64a44626c5fe200098070be0f32436dbb662775",
                "md5": "da74f6ea59d90eef11f7c9b649bda485",
                "sha256": "a1b900d9580aa1c2fab3b123ab7ff33413744da7c5f440bd4aadc4d40d14d920"
            },
            "downloads": -1,
            "filename": "pyro-api-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "da74f6ea59d90eef11f7c9b649bda485",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7349,
            "upload_time": "2020-05-15T16:17:41",
            "upload_time_iso_8601": "2020-05-15T16:17:41.501019Z",
            "url": "https://files.pythonhosted.org/packages/25/d7/a0812f5c16b0d4464f80a64a44626c5fe200098070be0f32436dbb662775/pyro-api-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-05-15 16:17:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pyro-ppl",
    "github_project": "pyro-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyro-api"
}
        
Elapsed time: 0.06044s