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

Warning: Could not import IPython parallel #143

Open
omarshehab opened this issue Jan 25, 2018 · 4 comments
Open

Warning: Could not import IPython parallel #143

omarshehab opened this issue Jan 25, 2018 · 4 comments

Comments

@omarshehab
Copy link

I am getting the following warning when I type from qinfer import simple_est_prec.

/home/shehab/anaconda2/envs/py36/lib/python3.6/site-packages/IPython/parallel.py:13: ShimWarning: The `IPython.parallel` package has been deprecated since IPython 4.0. You should import from ipyparallel instead.
  "You should import from ipyparallel instead.", ShimWarning)
/home/shehab/anaconda2/envs/py36/lib/python3.6/site-packages/qinfer/parallel.py:52: UserWarning: Could not import IPython parallel. Parallelization support will be disabled.
  "Could not import IPython parallel. "
@ihincks
Copy link
Collaborator

ihincks commented Jan 25, 2018

That warning should not affect simple_est_prec; you will be fine. If you don't want to see it, which I understand, you can turn off warnings or install ipyparallel with, for example, conda install ipyparallel.

@omarshehab
Copy link
Author

@ihincks : Thanks for your reply. Could you give me some idea about when this warning could matter?

@ihincks
Copy link
Collaborator

ihincks commented Jan 29, 2018

The only thing that depends on the ipyparallel module is the class DirectViewParallelizedModel in the file parallel.py. This class is not used by anything else, so this warning only matters when you want to use this class but don't have ipyparallel, and is slightly redundant because you would get an actual error if you tried. I believe the original rationale for throwing the warning was that we didn't want to add a dependency for a tangential feature.

However, I think there must be a smoother way to handle it, because it can hardly be considered an 'optional dependency' if one gets a red warning every time one tries to import qinfer.

@MichalKononenko
Copy link
Contributor

MichalKononenko commented Apr 3, 2018

ipyparallel interfaces with concurrent.futures now, so in the constructor of DirectViewParallelizedModel, we can ask for an Executor that would submit jobs to ipyparallel. It would also enable our code to work on the thread pool and process pool in the standard Python library as well.

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