--- id: pyro-api version: "0.1.2" license: Apache License 2.0 license_treatment: permissive maintenance: abandoned --- # pyro-api — Generic API for dispatch to Pyro backends. License: permissive · Maintenance: abandoned · Downloads: 1.2M/mo ## What it is and what it does Pyro API is a thin abstraction layer for probabilistic programming that lets you write models and inference code once and dispatch them to different Pyro backends—such as funsor or numpyro—without rewriting. It defines a generic interface for handlers, distributions, and other core components, then routes calls to whichever backend you register at runtime. The package itself has no runtime dependencies and is designed primarily for testing backend implementations. You register a backend using a context manager, then run your models and tests against it. This is useful if you're building a new Pyro backend or need to validate that your models work across multiple inference engines, but it's a library for framework developers rather than end users. Use it for: - Test a new Pyro backend implementation against a standard suite of models in pyro_api.testing - Write probabilistic models that can switch between backends (e.g., funsor and numpyro) at runtime - Validate backend compatibility by running the same inference code against multiple Pyro implementations - Build a wrapper around a custom Pyro backend and expose it through the standard pyro_api interface ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a generic dispatch API for probabilistic programming backends, allowing code to run against different Pyro implementations without modification. No—unless you are actively developing or maintaining a Pyro backend. The package is abandoned (last commit 2022-02-13), has no runtime dependencies so it's not a burden to remove, but offers no value to users of existing backends. If you need probabilistic programming, install a specific backend (funsor, numpyro) directly. ## Install pip install pyro-api uv add pyro-api poetry add pyro-api ## Installing pyro-api Before you install: Installation is frictionless with no runtime dependencies. However, the package is abandoned—last release was 2020-05-15 and last commit 2022-02-13—so expect no maintenance, bug fixes, or updates. License in practice: Licensed under Apache License 2.0 (permissive), so you can use, modify, and distribute the package freely in commercial and private projects with minimal restrictions. Quickstart: pip install pyro-api from pyro_api.dispatch import pyro_backend from pyro_api.testing import MODELS with pyro_backend(handlers='my_backend.handlers', distributions='my_backend.distributions'): for model_name in MODELS: f = MODELS[model_name]() model, model_args = f['model'], f.get('model_args', ()) model(*model_args) Requires a registered Pyro backend (e.g., funsor or numpyro) to be installed and importable; the package itself provides only the dispatch interface. Verify before relying: - Whether the package remains compatible with modern Pyro backends (funsor, numpyro) given its abandonment since 2022 - Whether Python 3.6 support claim is current or whether the package works on modern Python versions ## Package facts - License: Apache License 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags probabilistic programming dispatch, pyro backend abstraction, bayesian inference api, generic pyro interface, backend-agnostic modeling, probabilistic model testing, pyro abstraction layer, probabilistic-programming, backend-abstraction, testing-framework [View on SkillFed](https://skillfed.io/packages/pyro-api) · [View on PyPI](https://pypi.org/project/pyro-api/)