Skip to content

blackbox_external_likelihood.ipynb contains "modulenotfound" in first cell #4182

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

Closed
MarcoGorelli opened this issue Oct 23, 2020 · 5 comments
Closed

Comments

@MarcoGorelli
Copy link
Contributor

MarcoGorelli commented Oct 23, 2020

Seems this was introduced in commit a3622d3

$ git log --pretty=oneline -G "ModuleNotFoundError" -- docs/source/notebooks/blackbox_external_likelihood.ipynb
a3622d3f5c66f5fcc4dbcc52f8b1653a1f812583 Update more NBs. Remove Dawid-Skene.

See https://nbviewer.jupyter.org/github/pymc-devs/pymc3/blob/master/docs/source/notebooks/blackbox_external_likelihood.ipynb :

The Cython extension is already loaded. To reload it, use:
  %reload_ext Cython
Running on PyMC3 v3.6
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-2-1cf6341006dd> in <module>()
     19 import matplotlib
     20 import emcee
---> 21 import corner
     22 import os
     23 print("Python version:     {}".format(platform.python_version()))

ModuleNotFoundError: No module named 'corner'

cc @twiecki

@twiecki
Copy link
Member

twiecki commented Oct 26, 2020

Thanks @MarcoGorelli. We should probably just remove that dependency and use arviz for plotting. Want to do a PR?

@MarcoGorelli
Copy link
Contributor Author

sure, I'll take it up later this week!

@MarcoGorelli
Copy link
Contributor Author

Hi @twiecki

I tried running this notebook, but got to cell 4 and got

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-18-e2f2f0233a4c> in <module>
      7 ctrue = 3.0  # true y-intercept
      8 
----> 9 truemodel = my_model([mtrue, ctrue], x)
     10 
     11 # make data

NameError: name 'my_model' is not defined

I have Cython installed and am able to run the example from https://cython.readthedocs.io/en/latest/src/tutorial/cython_tutorial.html#primes

Is there any extra setup I need to do to be able to run this one?

@ricardoV94
Copy link
Member

ricardoV94 commented May 15, 2021

Should this be moved to pymc-examples @OriolAbril ?

@OriolAbril
Copy link
Member

We already have pymc-devs/pymc-examples#48 to track this. Some more context is probably good though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants