--- id: pyro-ppl version: "1.9.1" license: Apache 2.0 license_treatment: permissive maintenance: active --- # pyro-ppl — A Python library for probabilistic modeling and inference License: permissive · Maintenance: active · Downloads: 1.2M/mo ## What it is and what it does Pyro is a probabilistic programming library that lets you express Bayesian models and perform inference on them using PyTorch as its computational backbone. It abstracts away the complexity of building custom inference algorithms by providing high-level primitives for sampling, conditioning, and inference, while still allowing expert users to customize inference strategies when needed. The library is designed around the principle that you write generative models as ordinary Python functions, then use Pyro's inference engines to fit those models to data. It handles both discrete and continuous random variables, supports automatic differentiation for gradient-based inference, and scales to large datasets. The five core runtime dependencies (numpy, opt-einsum, pyro-api, torch, tqdm) keep the footprint minimal while providing the numerical and progress-tracking infrastructure needed for practical probabilistic modeling. Use it for: - Build Bayesian regression or classification models where you need posterior distributions over parameters, not just point estimates. - Perform approximate inference on complex generative models using variational inference or other automated inference strategies. - Design and run experimental designs or sensitivity analyses by sampling from posterior predictive distributions. - Model time-to-event data or other censored observations in survival analysis or reliability engineering. - Prototype custom probabilistic models for scientific research without writing low-level inference code from scratch. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Pyro is a deep probabilistic programming library built on PyTorch that enables you to define, fit, and sample from arbitrary probability distributions using composable abstractions for generative and inference models. Yes. Pyro is actively maintained, has no known vulnerabilities, installs with low friction, and is licensed permissively. It is the right choice if you need to build or fit probabilistic models in Python and want a mature, well-documented framework that abstracts away inference complexity while remaining flexible for expert customization. ## Install pip install pyro-ppl uv add pyro-ppl poetry add pyro-ppl ## Installing pyro-ppl Before you install: Installation is straightforward with low friction—the package is a pure Python wheel with five runtime dependencies (numpy, opt-einsum, pyro-api, torch, tqdm). Maintenance is active; the repository shows recent commits and the project is backed by community contributors including a team at the Broad Institute. License in practice: Licensed under Apache 2.0 (permissive), so you can use Pyro in commercial and proprietary projects without restriction, though you must include a copy of the license. Quickstart: pip install pyro-ppl import pyro import pyro.distributions as dist def model(): x = pyro.sample('x', dist.Normal(0, 1)) return x Requires torch as a runtime dependency; ensure torch is available in your environment. Verify before relying: - Whether the package's inference algorithms scale efficiently to the specific data sizes and model complexity you plan to use. - Performance characteristics and memory overhead compared to hand-written code for your particular use case. ## Package facts - License: Apache 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags probabilistic programming python, bayesian inference pytorch, deep generative models, variational inference library, probabilistic modeling framework, bayesian-inference, probabilistic-modeling, pytorch-based [View on SkillFed](https://skillfed.io/packages/pyro-ppl) · [View on PyPI](https://pypi.org/project/pyro-ppl/)