You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. "
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.
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.
ipyparallel interfaces withconcurrent.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.
Activity
ihincks commentedon 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 installipyparallelwith, for example,conda install ipyparallel.omarshehab commentedon Jan 29, 2018
@ihincks : Thanks for your reply. Could you give me some idea about when this warning could matter?
ihincks commentedon Jan 29, 2018
The only thing that depends on the
ipyparallelmodule is the classDirectViewParallelizedModelin the fileparallel.py. This class is not used by anything else, so this warning only matters when you want to use this class but don't haveipyparallel, 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 commentedon Apr 3, 2018
ipyparallel interfaces with
concurrent.futuresnow, so in the constructor ofDirectViewParallelizedModel, we can ask for anExecutorthat 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.