Skip to content

BUG: RandomWalk/joint_logprob spam warnings about non-contributing RVs in the graph #6401

Closed
@michaelosthege

Description

@michaelosthege

Describe the issue:

Running just a very simple RandomWalk leads to a bunch of warnings emitted by joint_logprob.

Reproduceable code example:

import pymc as pm

with pm.Model() as pmodel:
    init_dist = pm.Normal.dist(1, 1.1)
    innov_dist = pm.StudentT.dist(mu=0, sigma=0.2, nu=1)
    rw = pm.RandomWalk(
        "RW",
        init_dist=init_dist,
        innovation_dist=innov_dist,
        steps=9,
    )
    L = pm.Normal("L", mu=rw, observed=[0.1, 0.12, 0.115, 0.12, 0.125, 0.13, 0.135, 0.5, 0.51, 0.505])
    map_ = pm.find_MAP()

Error message:

c:\Users\zufal\miniconda3\envs\murefidev\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [studentt_rv{0, (0, 0, 0), floatX, False}.0, studentt_rv{0, (0, 0, 0), floatX, False}.out]
  warnings.warn(
c:\Users\zufal\miniconda3\envs\murefidev\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Users\zufal\miniconda3\envs\murefidev\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [studentt_rv{0, (0, 0, 0), floatX, False}.0, studentt_rv{0, (0, 0, 0), floatX, False}.out]
  warnings.warn(
c:\Users\zufal\miniconda3\envs\murefidev\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Users\zufal\miniconda3\envs\murefidev\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [studentt_rv{0, (0, 0, 0), floatX, False}.0, studentt_rv{0, (0, 0, 0), floatX, False}.out]
  warnings.warn(
c:\Users\zufal\miniconda3\envs\murefidev\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(

PyMC version information:

  • PyMC v4.2.2 (confirmed)
  • PyMC v5.0.0 (confirmed)

Context for the issue:

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions