CamDavidsonPilon / Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
MIT License
26.55k stars 7.85k forks source link

Notebook hangs #389

Closed ghost closed 6 years ago

ghost commented 6 years ago

Running this notebook hangs at the line below; I'm not able to break operation: https://github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/blob/42e8c484d24de0fbeb540a1a1ca70e6d6a710ac0/Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb#L733

Before it hangs, I do get some output on stderr, but it does not seem related:

C:\ProgramData\Anaconda2\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the  second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Multiprocess sampling (4 chains in 4 jobs)
CompoundStep
>Metropolis: [tau]
>Metropolis: [lambda_2_log__]
>Metropolis: [lambda_1_log__]

I'm wondering if this is related to: pymc-devs/pymc3#781

I'm running pymc3 v3.4.1 in python 2.7.14 (anaconda).

ghost commented 6 years ago

My best guess now an issue related to pymc-devs/pymc3#1247.

I will switch to another version of joblib or try Python3.

pointOfive commented 6 years ago

Just kindly piling on here :)

njobs=2 just sits but njobs=1 runs after pip install pymc3 --upgrade which provided 3.4.1.

I'm running in Py2.7 and I'm happy to provide any further system/versioning details desired if helpful.

ghost commented 6 years ago

After switching to Python3, I was able to get this running. It may have come down to a missing dependency, though.

conda install mkl-service libpython m2w64-toolchain
conda install -c conda-forge blas
ghost commented 6 years ago

@pointOfive I did notice an issue with njobs>1, but I think that was resolved after installing blas. Currently it runs fine with or without njobs=1, though the ASCII progress bar disappears from the notebook - instead it shows up in the terminal window where jupyter was launched.

This may be consistent with pymc-devs/pymc3#1247, since they mention repeatedly that the joblib issue disappears and reappears sporadically.