我正在使用一个开源项目来娱乐,但没有通过多处理池对BH-TSNE的使用。
Github来源:
https://github.com/kylemcdonald/AudioNotebooks/blob/master/Fingerprints%20to%20t-SNE.ipynb
具体错误 :
data = data.astype(np.float64)
def job(params):
start = time()
tsne(data, data_root, mode, initial_dims=params[0], perplexity=params[1])
print 'initial_dims={}, perplexity={}, {} seconds'.format(params[0], params[1], time() - start)
params = list(itertools.product(initial_dims, perplexities))
pool = Pool()
pool.map(job, params)
utils/bhtsne.py:129: ComplexWarning: Casting complex values to real discards the imaginary part
for sample in samples:
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-0350579d447b> in <module>()
7 params = list(itertools.product(initial_dims, perplexities))
8 pool = Pool()
----> 9 pool.map(job, params)
/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.pyc in map(self, func, iterable, chunksize)
249 '''
250 assert self._state == RUN
--> 251 return self.map_async(func, iterable, chunksize).get()
252
253 def imap(self, func, iterable, chunksize=1):
/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.pyc in get(self, timeout)
565 return self._value
566 else:
--> 567 raise self._value
568
569 def _set(self, i, obj):
AssertionError: ERROR: Call to bh_tsne exited with a non-zero return code exit status, please refer to the bh_tsne output for further details
我有bh_tsne
包装器,二进制文件也是如此。
包装器来源 : https://github.com/lvdmaaten/bhtsne
但不清楚我如何观察该子进程输出。
查看了一些谷歌搜索,在包装器中打开了默认的详细模式..但DIR或Jupyter笔记本中似乎没有出现任何输出
看起来Jupyter Notebook不能很好地使用这种类型的代码..但事实证明,这是我下面的计算机环境的问题。 必须从启用了东西的源代码构建numpy
https://github.com/numpy/numpy/issues/9254
重要的是......如果你在jupyter笔记本中崩溃,并且crass发生在池内的线程中......没有办法看到跟踪AFAIK..解决方法是直接在笔记本中运行代码或切换到非iPython