-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
AttributeError: scratchpad instance has no attribute 'test_value' #562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
But doesn't happen with other distributions? This is an odd error, I haven't see this before. What version of theano do On Tue, Jul 8, 2014 at 6:51 AM, Kaiyu Yang [email protected] wrote:
|
Closing because of no response. |
I am getting the same error. Consider this code:
The
I have absolutely no idea what causes it, but it's a major roadblock for using |
@michaelosthege The work around is to provide a testval: ("gamma", pymc3.Gamma.dist(alpha=2, beta=1/3, testval=.5)),
("beta", pymc3.Beta.dist(alpha=1, beta=1, testval=.5)), |
@junpenglao There are even more ways how this error can occur: This raises u = pymc3.DiscreteUniform.dist(0, 4, testval=3)
g = pymc3.Gamma.dist(alpha=12, beta=2, testval=8.2)
with pymc3.Model(theano_config={'compute_test_value': 'off'}) as pmodel:
pmodel.Var("u", u)
pmodel.Var("g", g) And this raises u = pymc3.DiscreteUniform.dist(0, 4, testval=3)
g = pymc3.Gamma.dist(alpha=12, beta=2, testval=8.2)
with pymc3.Model() as pmodel:
pmodel.Var("u", u)
pmodel.Var("g", g) The way how pymc3/theano make use of |
The second case is quite odd indeed. Any idea what's causing this? |
My best guess so far (it's blocking me..) is that there are additional I have not yet found the cause of the first issue, but my gut feeling is that it's a pymc3 bug, because other distributions work. |
When setting
And via
|
Have the same Issue with NegativeBinomial: formula = 'TOTAL_CONV ~ ' + ' + '.join(['%s' % variable for variable in data.columns[:-1]]) priorsd_coef = {} context for the modelwith pm.Model() as model_glm_nb:
AttributeError Traceback (most recent call last) AttributeError: 'ValidatingScratchpad' object has no attribute 'test_value' |
Hi @vanitoz, Background is that So depending on the context of where you encountered this issue (e.g. which version you're on) you might want to consider moving to |
I'm also getting the same error with the SMC sampler when trying to replicate the Approximate Bayesian Computation referenced in https://bayesiancomputationbook.com/notebooks/chp_08.html
Not sure how to fix this one? UPDATE - The error disappears if i remove the parrallel=True, which is weird. So probably related to multithreading rather than the attribute error above |
@NathanielF This should not be a problem in the new PyMC version (still in beta), if you can upgrade to it. |
@NathanielF if you're working with a latest version (currently |
Thanks Michael. i'm working with the environment recommended in the book, so yes 3.11.4. Thanks @ricardoV94 and @michaelosthege, I'll open a new issue then. |
Hi
When I run the example pymc/pymc/examples/latent_occupancy.py, the following exception occurs:
It seems that this happens whenever I create a free Bernoulli random variable
The text was updated successfully, but these errors were encountered: