動機は、scikit-learn の GridSearchCV をガンガン回したところ、Python がクラッシュするという自体に見舞われたこと。
詳細はわからない(し、追えない、スキル不足で。。。)のだが、同様の事例を調べたところ、次のようなものが見つかった。
まさに下のが今回の事象に近いのだが、
当初の問題は解決、毎度ながら先人には頭が下がります。 それよりも、どんどん高度になってゆく今日このごろ、はぁ、自分の中に確からしいものなど何も残っていないです。
詳細はわからない(し、追えない、スキル不足で。。。)のだが、同様の事例を調べたところ、次のようなものが見つかった。
- scikit-learn's GridSearchCV stops working when n_jobs>1 http://stackoverflow.com/questions/25260000/scikit-learns-gridsearchcv-stops-working-when-n-jobs1
まさに下のが今回の事象に近いのだが、
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
回答を見れば、
rebuild numpy from source and make it link against ATLAS or OpenBLAS instead of OSX Accelerate.
The numpy developers are working on binary distributions that include either ATLAS or OpenBLAS by default.
ということなんですね。
ということでインストール方法ですが、できるだけ自前ビルドは避けたい(できれば pip, brew で統一したい)ということでこのページを参考にしました。
pip uninstall numpy pip uninstall scipy brew install numpy # --with-openblas brew install scipy # --with-openblas # test the numpy & scipy install python -c 'import numpy ; numpy.test();' python -c 'import scipy ; scipy.test();'
当初の問題は解決、毎度ながら先人には頭が下がります。 それよりも、どんどん高度になってゆく今日このごろ、はぁ、自分の中に確からしいものなど何も残っていないです。

Comments
Post a Comment