Skip to content

Incorrect names for multiple identical deterministics #2912

Closed
@lpsinger

Description

@lpsinger

If you have multiple deterministics with the same values, then all of their names are incorrectly set to the name of the last deterministic. Here's an example:

>>> import pymc3 as pm
>>> from theano import tensor as tt
>>> with pm.Model() as model:
...     pm.Deterministic('foo', tt.as_tensor_variable(0.0))
...     pm.Deterministic('bar', tt.as_tensor_variable(0.0))
... 
TensorConstant{0.0}
TensorConstant{0.0}
>>> model.foo.name
'bar'
>>> model.bar.name
'bar'

Notice that both deterministics are named bar, whereas the first one should be named foo and the second one named bar.

Versions and main components

  • PyMC3 Version: 3.3
  • Theano Version: 1.0.1
  • Python Version: 3.6.5
  • Operating system: macOS 10.13.4
  • How did you install PyMC3: MacPorts

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions