whatisgithub

What is pyro?

pyro-ppl/pyro — explained in plain English

Analysis updated 2026-06-24

9,001PythonAudience · researcherComplexity · 4/5Setup · moderate

In one sentence

A Python library for probabilistic programming that lets you write statistical models describing uncertainty and then automatically infer the best parameters from observed data.

Mindmap

mindmap
  root((repo))
    What it does
      Probabilistic models
      Statistical inference
      Uncertainty modeling
    Tech stack
      Python
      PyTorch
    Use cases
      Bayesian inference
      Deep learning models
      Research models
    Audience
      Researchers
      ML engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a probabilistic model for medical diagnosis that estimates the probability of a condition given observed test results.

USE CASE 2

Combine a neural network with a statistical prior in a single Pyro model to build a Bayesian deep learning system.

USE CASE 3

Run automatic variational inference on a custom statistical model to fit it to observed data using Pyro's SVI interface.

What is it built with?

PythonPyTorchpip

How does it compare?

pyro-ppl/pyrotogethercomputer/openchatkitoctoprint/octoprint
Stars9,0018,9898,985
LanguagePythonPythonPython
Setup difficultymoderatehardmoderate
Complexity4/54/53/5
Audienceresearcherresearchergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires PyTorch installed first, GPU recommended for larger models but not required.

So what is it?

Pyro is a Python library for a style of programming called probabilistic programming. In regular programming, code produces a single definite output for a given input. In probabilistic programming, you write code that describes probability distributions: models of how uncertain quantities relate to each other. The system then figures out, given some observed data, which settings of the unknown quantities best explain what was seen. This matters for problems where you need to reason under uncertainty. A medical diagnostic model might ask: given these test results, what is the probability the patient has condition X? A financial model might ask: given past price movements, what distribution of future returns should we expect? Pyro gives researchers and engineers a way to write those kinds of models in Python and then run automatic statistical inference on them. Pyro is built on PyTorch, a widely used library for deep learning (the technology behind many modern AI systems). This means Pyro models can combine traditional statistical components with neural networks in the same model. The library is designed to scale to large datasets and to be composable: complex models are built by combining simpler pieces. The project was originally developed at Uber's AI research team and is now maintained by community contributors including a team at the Broad Institute, a biomedical research organization. In 2019, it joined the Linux Foundation as an official open source project. It is installed as a Python package via pip and comes with a collection of example models and tutorials covering common use cases. The README includes a citation for the original research paper published in the Journal of Machine Learning Research for those who want to reference the work formally.

Copy-paste prompts

Prompt 1
Help me write a Pyro model that infers the bias of a coin from observed flips using variational inference and ELBO loss.
Prompt 2
Show me how to define a Pyro model with a Gaussian mixture and run MCMC to estimate the posterior distribution.
Prompt 3
I want to build a time-series forecasting model in Pyro that accounts for uncertainty in the predictions. Walk me through the structure.
Prompt 4
Help me combine a PyTorch neural network encoder with a Pyro latent variable model to build a variational autoencoder.

Frequently asked questions

What is pyro?

A Python library for probabilistic programming that lets you write statistical models describing uncertainty and then automatically infer the best parameters from observed data.

What language is pyro written in?

Mainly Python. The stack also includes Python, PyTorch, pip.

How hard is pyro to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is pyro for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.