Skip to content
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

nbsampler not recognising ipython notebook #1417

Closed
philastrophist opened this issue Sep 30, 2016 · 2 comments
Closed

nbsampler not recognising ipython notebook #1417

philastrophist opened this issue Sep 30, 2016 · 2 comments

Comments

@philastrophist
Copy link
Contributor

I'm working with the current master branch of pymc3 and I'm trying to use the nbsample in my jupyter notebook.
I've installed ipywidgets with conda install -c conda-forge ipywidgets and called the nbsample with:

with model:
    trace = nbsample(2000, step, start=start) # draw 2000 posterior samples using NUTS sampling

it raises the following:

---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
<ipython-input-6-5a8793f1d005> in <module>()
      1 with model:
----> 2     trace = nbsample(2000, step, start=start) # draw 2000 posterior samples using NUTS sampling

e:\git_pkgs\pymc3-dev\pymc3\interactive_sampling.pyc in nbsample(draws, step, start, trace, chain, tune, model, random_seed)
     78             assert(hasattr(IPython.get_ipython(), 'comm_manager'))
     79         except (AssertionError, NameError, KeyError) as e:
---> 80             raise NotImplementedError(_no_notebook_error_message)
     81 
     82         display.display_html(_javascript, raw=True)

NotImplementedError: nbsample can only be run inside IPython Notebook.

it seems that the assertion assert(hasattr(interactive_sampling.IPython.get_ipython(), 'comm_manager')) fails.

@fonnesbeck
Copy link
Member

To be honest, I had forgotten about nbsample. Given that it has no tests, we should probably remove it. I recommend just using sample.

@twiecki
Copy link
Member

twiecki commented Oct 3, 2016

+1

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

3 participants