【发布时间】:2015-09-16 08:05:44
【问题描述】:
我需要在多个核心上运行分类器。我正在使用 scikit-learn 和 Python 2.7。
来自 scikit-learn 的 GridSearchCV 模块有一个名为 n_jobs 的参数,可让您在多个内核上运行网格搜索。当我将此参数设置为 10 时,我得到如下所示的内存分配错误。有什么想法吗?我的机器有 32 个核心。
Traceback (most recent call last):
...
w.start()
File "../anaconda/lib/python2.7/multiprocessing/process.py", line 130, in start
self._popen = Popen(self)
File "/home/nhailu/anaconda/lib/python2.7/multiprocessing/forking.py", line 121, in __init__
self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory
【问题讨论】:
标签: multithreading python-2.7 scikit-learn