# Aesara aeppl.logprob.ParameterValueError

**URL:** <https://discourse.pymc.io/t/aesara-aeppl-logprob-parametervalueerror/9274>\
**Category:** v3\
**Tags:** aesara, smc\
**Created:** [April 25, 2022, 10:22am UTC](https://discourse.pymc.io/t/aesara-aeppl-logprob-parametervalueerror/9274 "2022-04-25T10:22:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vian](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/vian/32/4300_2.png) [@vian](https://discourse.pymc.io/u/vian)\
**Post date:** [April 25, 2022, 10:22am UTC](https://discourse.pymc.io/t/aesara-aeppl-logprob-parametervalueerror/9274/1 "2022-04-25T10:22:26Z")

</div>

Hi there,

I’m trying to update my script which uses 3.11.4 to 3.11.5 and ran into two issues:

> ERROR (aesara.graph.opt): Optimization failure due to: transform\_values  
> Optimization failure due to: transform\_values  
> ERROR (aesara.graph.opt): node: truncated\_normal\_rv{0, (0, 0, 0, 0), floatX, False}(RandomStateSharedVariable(\<RandomState(MT19937) at 0x7FA8557BA840\>), TensorConstant{}, TensorConstant{11}, TensorConstant{2.0}, TensorConstant{2.0}, TensorConstant{1.0}, TensorConstant{3.0})  
> node: truncated\_normal\_rv{0, (0, 0, 0, 0), floatX, False}(RandomStateSharedVariable(\<RandomState(MT19937) at 0x7FA8557BA840\>), TensorConstant{}, TensorConstant{11}, TensorConstant{2.0}, TensorConstant{2.0}, TensorConstant{1.0}, TensorConstant{3.0})  
> ERROR (aesara.graph.opt): TRACEBACK:  
> TRACEBACK:  
> File “python3.9/site-packages/aesara/graph/op.py”, line 522, in rval  
> r = p(n, [x[0] for x in i], o)  
> File “python3.9/site-packages/aeppl/transforms.py”, line 48, in perform  
> raise NotImplementedError(  
> NotImplementedError: These `Op`s should be removed from graphs used for computation.

This seems just to be warning and the code proceeds. However, there is a random error happening with SMC (apparently never with NUTS):

> log\_thunk\_trace: There was a problem executing an Op.  
> multiprocessing.pool.RemoteTraceback:  
> “”"  
> Traceback (most recent call last):  
> File “python3.9/multiprocessing/pool.py”, line 125, in worker  
> result = (True, func(\*args, \*\*kwds))  
> File “python3.9/multiprocessing/pool.py”, line 51, in starmapstar  
> return list(itertools.starmap(args[0], args[1]))  
> File “python3.9/site-packages/pymc/smc/sample\_smc.py”, line 439, in \_apply\_args\_and\_kwargs  
> return fn(\*args, \*\*kwargs)  
> File “python3.9/site-packages/pymc/smc/sample\_smc.py”, line 363, in \_sample\_smc\_int  
> smc.\_initialize\_kernel()  
> File “python3.9/site-packages/pymc/smc/smc.py”, line 214, in \_initialize\_kernel  
> initial\_point, [self.model.varlogpt], self.variables, shared  
> File “python3.9/site-packages/pymc/model.py”, line 871, in varlogpt  
> return self.logpt(vars=self.free\_RVs)  
> File “python3.9/site-packages/pymc/model.py”, line 763, in logpt  
> rv\_logps = joint\_logpt(list(rv\_values.keys()), rv\_values, sum=False, jacobian=jacobian)  
> File “python3.9/site-packages/pymc/distributions/logprob.py”, line 223, in joint\_logpt  
> temp\_logp\_var\_dict = factorized\_joint\_logprob(  
> File “python3.9/site-packages/aeppl/joint\_logprob.py”, line 186, in factorized\_joint\_logprob  
> q\_logprob\_vars = \_logprob(  
> File “python3.9/functools.py”, line 877, in wrapper  
> return dispatch(args[0]. **class** )(\*args, \*\*kw)  
> File “python3.9/site-packages/pymc/distributions/distribution.py”, line 122, in logp  
> return class\_logp(value, \*dist\_params)  
> File “python3.9/site-packages/pymc/distributions/continuous.py”, line 785, in logp  
> return check\_parameters(logp, \*bounds)  
> File “python3.9/site-packages/pymc/distributions/dist\_math.py”, line 67, in check\_parameters  
> return CheckParameterValue(msg)(logp, all\_true\_scalar)  
> File “python3.9/site-packages/aesara/graph/op.py”, line 297, in **call**  
> compute\_test\_value(node)  
> File “python3.9/site-packages/aesara/graph/op.py”, line 135, in compute\_test\_value  
> required = thunk()  
> File “python3.9/site-packages/aesara/link/c/op.py”, line 103, in rval  
> thunk()  
> File “python3.9/site-packages/aesara/link/c/basic.py”, line 1766, in **call**  
> raise exc\_value.with\_traceback(exc\_trace)  
> aeppl.logprob.ParameterValueError  
> “”"

Interestingly, when I change one of the RVs from TruncatedNormal to Uniform, the error never happens it seems, while occurs randomly with TruncatedNormal. I still get the warning message in both cases, however.

Anyway, any help in guiding me through debugging this would be appreciated! I assume this is somehow related to the prior sampling with SMC? By the way, I see that p\_acc\_rate seems to be gone from the latter? I’ll try to extract a minimal example script but that’s not straightforward.

Cheers,  
Vian

---

<div class="post-metadata">

**Author:** ![vian](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/vian/32/4300_2.png) [@vian](https://discourse.pymc.io/u/vian)\
**Post date:** [April 25, 2022, 12:36pm UTC](https://discourse.pymc.io/t/aesara-aeppl-logprob-parametervalueerror/9274/3 "2022-04-25T12:36:01Z")

</div>

While trying to make a minimal script, I realized the issue comes from:  
theano.config.compute\_test\_value = ‘ignore’

which I had left, with importing aesara as theano. Noe I don’t have the warning message or the random error.
