-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Replacing PyMC3 plots w/ Arviz plots & sigma Param change [Part 7] #19
Replacing PyMC3 plots w/ Arviz plots & sigma Param change [Part 7] #19
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
View / edit / reply to this conversation on ReviewNB twiecki commented on 2021-01-29T16:18:25Z Where did the output of summary() go? CloudChaoszero commented on 2021-02-02T05:15:43Z I ignored this, as there was an error in the above cell that I was not able to run. I did not how to go about resolving it, seen below.
Section: "Create fine model and perform inference"
RuntimeError Traceback (most recent call last) <ipython-input-23-17659000b718> in <module> 29 method_names.append("Metropolis") 30 traces.append( ---> 31 pm.sample( 32 draws=ndraws, 33 step=step_metropolis, ......... ~/opt/anaconda3/envs/pymc3-dev/lib/python3.8/site-packages/pymc3/parallel_sampling.py in recv_draw(processes, timeout) 357 else: 358 error = RuntimeError("Chain %s failed." % proc.chain) --> 359 raise error from old_error 360 elif msg[0] == "writing_done": 361 proc._readable = True CloudChaoszero commented on 2021-02-02T05:54:14Z Small update:
I found this PR (#3844) and added: mp_ctx="forkserver", pickle_backend='dill', return_inferencedata=True However, now I am getting the following:
Multiprocess sampling (2 chains in 2 jobs) MLDA: [x, Intercept] |
View / edit / reply to this conversation on ReviewNB twiecki commented on 2021-01-29T16:18:25Z Also misses the outputs of the samplers. |
View / edit / reply to this conversation on ReviewNB twiecki commented on 2021-01-29T16:18:26Z no plot CloudChaoszero commented on 2021-02-02T05:16:59Z This and other parts of this file are subsequent to the error from the first comment, unfortunately. Let me know what next steps I should take in this case. :) CloudChaoszero commented on 2021-02-07T06:43:24Z acknowledeged now :D |
View / edit / reply to this conversation on ReviewNB twiecki commented on 2021-01-29T16:18:27Z no plot |
@@ -533,7 +533,7 @@ | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably add the model context to this and below to future proof this and get rid of the annoying warning.
Reply via ReviewNB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great. I quite didn't understand what the FutureWarning recommended, but I am happy to update the description as a PR.
Here was my take on what the FutureWarning recommended haha:
with model: trace2_az = az.from_pymc3(trace2) az.summary(trace2_az)
Reviewed all of these, looks great but see comments. |
I ignored this, as there was an error in the above cell that I was not able to run. I did not how to go about resolving it, seen below.
Section: "Create fine model and perform inference"
RuntimeError Traceback (most recent call last) <ipython-input-23-17659000b718> in <module> 29 method_names.append("Metropolis") 30 traces.append( ---> 31 pm.sample( 32 draws=ndraws, 33 step=step_metropolis, ......... ~/opt/anaconda3/envs/pymc3-dev/lib/python3.8/site-packages/pymc3/parallel_sampling.py in recv_draw(processes, timeout) 357 else: 358 error = RuntimeError("Chain %s failed." % proc.chain) --> 359 raise error from old_error 360 elif msg[0] == "writing_done": 361 proc._readable = True View entire conversation on ReviewNB |
This and other parts of this file are subsequent to the error from the first comment, unfortunately. Let me know what next steps I should take in this case. :) View entire conversation on ReviewNB |
Small update:
I found this PR and added: mp_ctx="forkserver", pickle_backend='dill', return_inferencedata=True However, now I am getting the following:
Multiprocess sampling (2 chains in 2 jobs) MLDA: [x, Intercept] View entire conversation on ReviewNB |
Can you try updating PyMC3 and Theano? Otherwise this seems like a Aesara bug. CC @brandonwillard |
That environment's version of Theano is too old; you can tell by the module name: |
@brandonwillard Thanks for the response! Hmm, unfortunately I get some more errors. I updated the particular notebook to show the error, seen below. (If the details are too much for this PR, I can submit a detailed issue in Aesara? Let me know!) Adding these params in pm.sample() method_names.append("Metropolis")
traces.append(
pm.sample(
draws=ndraws,
step=step_metropolis,
chains=nchains,
tune=nburn,
discard_tuned_samples=discard_tuning,
random_seed=sampling_seed,
start=MAP,
mp_ctx="forkserver",
pickle_backend='dill',
) I get If I do not add the params
then I get a chained 0 error 😢 |
Please, provide the complete trace as formatted markdown. If the trace is too large, it can be wrapped in HTML |
@brandonwillard Thanks for that! (useful tip 🔥 ) Here is the Gist for when we use
https://gist.github.com/CloudChaoszero/2ffbc8efa6157786102c8a4659bf5c11 Here is the Gist for when we do not use the params, originally in the notebook |
I don't see any connections to Theano-PyMC, but a quick search did yield this open |
@brandonwillard Thanks for checking it out. After some further research, I founda. workaround is to use Here is what I added at the end of each cores=1,
mp_ctx="forkserver", |
acknowledeged now :D View entire conversation on ReviewNB |
As a note, I updated my package dependencies and did more research this time on navigating the errors encountered with pymc3. In particular, this PR uses
Deps
|
Thanks @CloudChaoszero! |
Description
The following is a large PR breakdown of PR #16.
Replace PyMC3 dependent plots with arviz plots in case studies & examples.
Replace parameter
sd
withsigma
(e.g. some examples havepm.Normal(...sd=...)