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

Can't run notebook example #8

Closed
ariddell opened this issue Jun 16, 2015 · 9 comments
Closed

Can't run notebook example #8

ariddell opened this issue Jun 16, 2015 · 9 comments

Comments

@ariddell
Copy link

The library looks great. Thank you!

Just trying to run the notebook example with IPython 3.1.0 and hitting this error (including only the top):

---------------------------------------------------------------------------
RemoteTraceback                           Traceback (most recent call last)
RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/ag/.virtualenvs/py3/lib/python3.4/site-packages/joblib/parallel.py", line 92, in __call__
    return self.func(*args, **kwargs)
  File "/home/ag/.virtualenvs/py3/lib/python3.4/site-packages/pyLDAvis/_prepare.py", line 136, in _find_relevance_chunks
    return pd.concat(map(lambda l: _find_relevance(log_ttd, log_lift, R, l), lambda_seq))
  File "/usr/lib/python3/dist-packages/pandas/tools/merge.py", line 929, in concat
    verify_integrity=verify_integrity)
  File "/usr/lib/python3/dist-packages/pandas/tools/merge.py", line 944, in __init__
    '"{0}"'.format(type(objs).__name__))
AssertionError: first argument must be a list-like of pandas objects, you passed an object of type "map"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.4/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/home/ag/.virtualenvs/py3/lib/python3.4/site-packages/joblib/parallel.py", line 102, in __call__
    raise TransportableException(text, e_type)
joblib.my_exceptions.TransportableException: TransportableException
@bmabey
Copy link
Owner

bmabey commented Jun 16, 2015

Hmm.. odd that the travis tests didn't detect this. What version of pandas are you using?

@ariddell
Copy link
Author

0.13.1

On 06/16, Ben Mabey wrote:

Hmm.. odd that the travis tests didn't detect this. What version of pandas are you using?


Reply to this email directly or view it on GitHub:
#8 (comment)

@bmabey
Copy link
Owner

bmabey commented Jun 16, 2015

@ariddell okay, a newer version of pandas may help. For now though could you clone master of pyLDAVis and install it (python setup.py install) to see if my latest commit fixes it for 13?

@ariddell
Copy link
Author

I'm not having much luck getting the newer IPython installed, so this is proving hard to test. I'll keep you posted if I figure it out.

@bmabey
Copy link
Owner

bmabey commented Jun 17, 2015

To test this fix I made you don't need any newer libraries aside from installing this one from master.

@ariddell
Copy link
Author

Nothing's showing up in my old IPython notebook window although the error does disappear (there are just a lot of numpy warnings).

Sorry for the imprecise report. I can open a new issue if I have time to dig into this and reproduce it.

@ariddell
Copy link
Author

Could there be a circular import somewhere? Now I'm getting this:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-9-f963778b0dc8> in <module>()
----> 1 import pyLDAvis

/home/ag/.virtualenvs/py3/lib/python3.4/site-packages/pyLDAvis-1.2.0-py3.4.egg/pyLDAvis/__init__.py in <module>()
     41 __version__ = '1.2.0'
     42 
---> 43 from ._display import *
     44 from ._prepare import prepare, js_PCoA, PreparedData

/home/ag/.virtualenvs/py3/lib/python3.4/site-packages/pyLDAvis-1.2.0-py3.4.egg/pyLDAvis/_display.py in <module>()
     12 from .utils import get_id, write_ipynb_local_js, NumPyEncoder
     13 from ._prepare import PreparedData
---> 14 from . import urls
     15 
     16 __all__ = ["prepared_data_to_html", "display",

ImportError: cannot import name 'urls'

@bmabey
Copy link
Owner

bmabey commented Jun 18, 2015

I have seen that problem in the past but it has happened when I reload the modules during development. I didn't think it would happen with clean/initial imports, at least I've never seen it happen in that case. I don't see a circular dep but I could be wrong. I'm not sure how else to explain the error since my python experience is limited.

@ariddell
Copy link
Author

No worries. I'll get to the bottom of it eventually. Thanks for the project!

paul-english added a commit to paul-english/pyLDAvis that referenced this issue Aug 5, 2015
* 'master' of https://github.com/bmabey/pyLDAvis: (84 commits)
  fixes other typo in gl notebook
  fix typo
  use the graphlab API for it's prepare, 3x+ speed improvement!
  updates notebook with models from LDAvis package
  replaces use of map with list comprehension to help with bmabey#8
  pass kargs to prepare fn in gensim and graphlab helpers. Closes bmabey#6, bmabey#7.
  releases v1.2.0
  adds link to the R vignette that explains the visualization
  prevents prepare from blowing up when used with a vocab smaller than R
  make the gensim extraction more explicit... trying to find bug in logic
  updates gensim adapter to get topic term dists directly /ht @cscorley
  fixes Makefile to run on osx
  releases v1.1.0
  change how web assets are served from github.. using detatched branch
  fixes graphlab viz
  fixes bug in graphlab model prepare causing bogus visualizations!
  doc fixes
  fix pypi badge
  release v1.0.0
  prep for v1.0.0 release
  ...
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

2 participants