Skip to content

Warning: Could not import IPython parallel #143

Open

Description

@omarshehab

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. "

Activity

  1. ihincks commented on Jan 25, 2018

    @ihincks
    Collaborator

    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.

  2. omarshehab commented on Jan 29, 2018

    @omarshehab
    Author

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

  3. ihincks commented on Jan 29, 2018

    @ihincks
    Collaborator

    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.

  4. MichalKononenko commented on Apr 3, 2018

    @MichalKononenko
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions