joblib.externals.loky.process_executor.BrokenProcessPool: A task has failed to un-serialize. Please
生活随笔
收集整理的這篇文章主要介紹了
joblib.externals.loky.process_executor.BrokenProcessPool: A task has failed to un-serialize. Please
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
項目場景:
編程語言:python
編程環境:windows+pycharm
具體環境:使用的因果推斷模型, DMLOrthoForest
問題描述:
DMLOrthoForest中出現的進程紊亂錯誤,導致,進程反饋亂碼,進程終結。
joblib.externals.loky.process_executor.BrokenProcessPool: A task has failed to un-serialize. Please ensure that the arguments of the function are all picklable.出錯位置:
est = DMLOrthoForest(n_trees=100,max_depth=5,model_Y=WeightedLasso(alpha=0.01),model_T=WeightedLasso(alpha=0.01))原因分析:
可能是windows進程紊亂,跑程序,一開始不會出現,但是之后再次實驗,會報錯,應該是之前進程沒殺死,導致進程紊亂
解決方案:
方法1
我們將默認的n_jobs=-1改成n_jobs=1即可,使用單線程。
缺點,實驗速度變慢
即
方法2
還有一種解決辦法,重啟windows系統,再跑程序,一開始不會出現,但是之后再次實驗,會報錯,應該是之前進程沒殺死,導致進程紊亂。
總結
以上是生活随笔為你收集整理的joblib.externals.loky.process_executor.BrokenProcessPool: A task has failed to un-serialize. Please的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 有衬线字体和无衬线字体。
- 下一篇: 职称计算机考试f11,2016全国职称计