mackelab / delfi

Density estimation likelihood-free inference. No longer actively developed see https://github.com/mackelab/sbi instead
http://www.mackelab.org/delfi
Other
71 stars 28 forks source link

getting started example gives runtime error because of mkl version 2018 #19

Closed awakenting closed 6 years ago

awakenting commented 6 years ago

Hey, I tried the example from the "Getting started" page and got the following runtime error:

home-path/.local/lib/python3.6/site-packages/theano/configdefaults.py in check_mkl_openmp()
   1250         import mkl
   1251         if '2018' in mkl.get_version_string():
-> 1252             raise RuntimeError('To use MKL 2018 with Theano you MUST set "MKL_THREADING_LAYER=GNU" in your environement.')
   1253     except ImportError:
   1254         raise RuntimeError("""

RuntimeError: To use MKL 2018 with Theano you MUST set "MKL_THREADING_LAYER=GNU" in your environement.

when running the following code:

from delfi.inference import Basic

inf_basic = Basic(generator=g, n_components=2, n_hiddens=[10])

which I think is related to this theano issue: https://github.com/Theano/Theano/issues/6568

Downgrading to mkl 2017 via "conda install mkl=2017" solved the issue for me so maybe you want to put that into your dependencies?

Cheers, Andrej

jan-matthis commented 6 years ago

Thanks for reporting this. Reading up on the issue, this seems to be fixed in newer versions of NumPy. For now, I would rely on this, rather than through dependencies. Alternatively, the error can be surpressed by setting an environment variable (see https://github.com/Theano/Theano/issues/6568#issuecomment-382900346).