SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1810.09538 · 2018

Pyro: Deep Universal Probabilistic Programming

arXiv · PDF · Open in the Atlas

Code that ran

10 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1810.09538.json · badge: /api/ran/1810.09538.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
uber/pyro canonical (classifier label)
classifier basis: census
10 ran · 2 no recorded run
FunctionStatusWhere it lives
deterministic Ran
ran on a synthesized input
uber/pyro/pyro/primitives.py
code served (permissive licence) · get_code("9b546146a9341d9d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import pyro
import pyro.distributions as dist

torch.manual_seed(0)

# The deterministic function requires:
# - name: str
# - value: torch.Tensor
# - event_dim: Optional[int]

# Create a simple tensor value
value_tensor = torch.randn(2, 4)

# Create arguments dictionary
ARGS = {
    "name": "test_deterministic",
    "value": value_tensor,
    "event_dim": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pyro, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get Ran
ran on a synthesized input
uber/pyro/pyro/settings.py
code served (permissive licence) · get_code("6d95513e40539eea")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import sys
from types import ModuleType

# Create a mock module structure to simulate the registry
mock_module = ModuleType("mock_settings")
mock_module.setting_value = "test_value"

# Add the mock module to sys.modules so it can be imported
sys.modules["mock_settings"] = mock_module

# Create the _REGISTRY that the function expects
_REGISTRY = {
    "test_setting": ("mock_settings", "setting_value", None)
}

# Make _REGISTRY available in the function's scope
import types
current_module = sys.modules[__name__]
current_module._REGISTRY = _REGISTRY

ARGS = {
    "alias": "test_setting"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
param Ran
ran on a synthesized input
uber/pyro/pyro/primitives.py
code served (permissive licence) · get_code("64728c1825265ffd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch.distributions import constraints

torch.manual_seed(0)

ARGS = {
    "name": "test_param",
    "init_tensor": torch.randn(2, 4),
    "constraint": constraints.real,
    "event_dim": 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pyro, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
param Ran
ran on a synthesized input
uber/pyro/pyro/contrib/minipyro.py
code served (permissive licence) · get_code("391426830a3c85ae")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import weakref

# Initialize global state
PYRO_STACK = []
PARAM_STORE = {}

# Define a minimal handler class for the stack
class MinimalHandler:
    def process_message(self, msg):
        pass
    
    def postprocess_message(self, msg):
        pass

# Set random seed for reproducibility
torch.manual_seed(0)

# Create test arguments
name = "test_param"
init_value = torch.tensor([1.0, 2.0, 3.0, 4.0])
constraint = torch.distributions.constraints.real
event_dim = None

ARGS = {
    "name": name,
    "init_value": init_value,
    "constraint": constraint,
    "event_dim": event_dim
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pyro_method Ran
ran on a synthesized input
uber/pyro/pyro/nn/module.py
code served (permissive licence) · get_code("b2adfe9f41fdef7e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import functools
from typing import Callable
import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal PyroModule stand-in class
class PyroModule:
    def __init__(self):
        self._pyro_context = self._create_context()
    
    def _create_context(self):
        # Return a context manager that does nothing
        class DummyContext:
            def __enter__(self):
                return self
            def __exit__(self, *args):
                return False
        return DummyContext()

# Create a simple test function that matches the decorator's expected signature
def test_method(self: PyroModule, x: torch.Tensor, y: int = 5) -> torch.Tensor:
    """A sample pyro method implementation"""
    return x * y

# Apply the decorator
@functools.wraps(test_method)
def cached_fn(self: PyroModule, *args, **kwargs):
    with self._pyro_context:
        return test_method(self, *args, **kwargs)

# Build arguments for pyro_method
test_tensor = torch.randn(2, 4)
test_int = 3

ARGS = {
    'fn': test_method,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, typing_extensions — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample Ran
ran on a synthesized input
uber/pyro/pyro/primitives.py
code served (permissive licence) · get_code("74a5ee03d772597d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import pyro
import pyro.distributions as dist
from pyro.poutine.runtime import InferDict

torch.manual_seed(0)

# Create a simple distribution
fn = dist.Normal(loc=torch.tensor(0.0), scale=torch.tensor(1.0))

# Create observation tensor
obs = torch.tensor([0.5, 0.3])

# Create optional obs_mask
obs_mask = torch.tensor([True, False])

# Create infer dict
infer_dict = {'is_observed': False}

ARGS = {
    'name': 'test_sample',
    'fn': fn,
    'obs': obs,
    'obs_mask': obs_mask,
    'infer': infer_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pyro, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample Ran
ran on a synthesized input
uber/pyro/pyro/contrib/minipyro.py
code served (permissive licence) · get_code("09a1330f336b8de2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.distributions as dist

torch.manual_seed(0)

class MockHandler:
    def process_message(self, msg):
        pass
    
    def postprocess_message(self, msg):
        pass

class MockDistribution:
    def __call__(self, *args, **kwargs):
        return torch.tensor(3.14)

def setup():
    # Clear the global stack
    global PYRO_STACK
    PYRO_STACK = []
    
    # Create a simple distribution function
    fn = MockDistribution()
    
    ARGS = {
        'name': 'test_sample',
        'fn': fn,
        'args': (torch.tensor([1.0, 2.0, 3.0, 4.0]),),
        'kwargs': {}
    }
    
    return ARGS

ARGS = setup()
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
torch_isinf Ran
ran on a synthesized input
uber/pyro/pyro/util.py
code served (permissive licence) · get_code("a24d2d42e0992dcc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math
import numbers

torch.manual_seed(0)

# Test case 1: A regular number (not infinite)
test_number = 5.0

# Test case 2: A number that is positive infinity
test_inf_pos = math.inf

# Test case 3: A number that is negative infinity
test_inf_neg = -math.inf

# Test case 4: A tensor with normal values
test_tensor_normal = torch.tensor([1.0, 2.0, 3.0, 4.0])

# Test case 5: A tensor containing positive infinity
test_tensor_inf_pos = torch.tensor([1.0, math.inf, 3.0, 4.0])

# Test case 6: A tensor containing negative infinity
test_tensor_inf_neg = torch.tensor([1.0, 2.0, -math.inf, 4.0])

# Test case 7: A tensor with mixed infinities
test_tensor_mixed_inf = torch.tensor([math.inf, -math.inf, 3.0, 4.0])

# We'll test with a normal tensor as the primary case
ARGS = {
    "x": test_tensor_normal
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
torch_isnan Ran
ran; our contract draft was wrong, not the code
uber/pyro/pyro/util.py
code served (permissive licence) · get_code("a3ab121ea1ba8ca3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numbers
import torch

torch.manual_seed(0)

# Test case 1: Tensor with NaN
tensor_with_nan = torch.tensor([[1.0, 2.0, float('nan'), 4.0],
                                 [5.0, 6.0, 7.0, 8.0]])

# Test case 2: Tensor without NaN
tensor_without_nan = torch.tensor([[1.0, 2.0, 3.0, 4.0],
                                    [5.0, 6.0, 7.0, 8.0]])

# Test case 3: Number that is NaN
number_nan = float('nan')

# Test case 4: Number that is not NaN
number_not_nan = 5.0

ARGS = {
    "x": tensor_with_nan
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
warn_if_nan Ran
ran on a synthesized input
uber/pyro/pyro/util.py
code served (permissive licence) · get_code("3e52b9376b2fd58d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numbers
import warnings

torch.manual_seed(0)

# Test case 1: Regular tensor without NaN
tensor_normal = torch.randn(2, 4)

# Test case 2: Tensor with NaN
tensor_with_nan = torch.full((2, 4), float('nan'))

# Test case 3: Tensor with requires_grad=True
tensor_grad = torch.randn(2, 4, requires_grad=True)

# Test case 4: A number (int)
number_int = 42

# Test case 5: A number (float)
number_float = 3.14

# Test case 6: A NaN number
number_nan = float('nan')

ARGS = {
    'value': tensor_normal,
    'msg': 'test message',
    'filename': 'test_file.py',
    'lineno': 42,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
apply_stack Not yet run
unverified (harvested, no recorded run)
uber/pyro/pyro/contrib/minipyro.py
code served (permissive licence) · get_code("726da10b8d669a17")
How it ran

no invocation recorded.

register Not yet run
unverified (harvested, no recorded run)
uber/pyro/pyro/settings.py
code served (permissive licence) · get_code("4ccde65baa528cbc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 11 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
torch_isnan 1 other paper
1 later
2402.07160 (2024-02)
PASOA-PArticle baSed Bayesian Optimal Adaptive design

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Pyro is a probabilistic programming language built on Python as a platform for developing advanced probabilistic models in AI research. To scale to large datasets and high-dimensional models, Pyro uses stochastic variational inference algorithms and probability distributions built on top of PyTorch, a modern GPU-accelerated deep learning framework. To accommodate complex or model-specific algorithmic behavior, Pyro leverages Poutine, a library of composable building blocks for modifying the behavior of probabilistic programs.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1810.09538")
get_code_for_paper("1810.09538")
have("1810.09538")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1810.09538.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1810.09538.svg)](https://syntology.ai/paper/1810.09538)

Connect an agent — have() is free.