在storm bolt中使用外部库(python)的限制

xcitsw88  于 2021-06-24  发布在  Storm
关注(0)|答案(1)|浏览(289)

我想实施一个螺栓(https://github.com/nathanmarz/storm)使用scikit机器学习api对元组进行一些繁重的处理(http://scikit-learn.org/)
例如-

from sklearn import decomposition
from sklearn import datasets

trans_corpus = vectorizer.fit_transform(corpus)
tfidf = text.TfidfTransformer().fit_transform(trans_corpus)
...
...

这可能吗?在集群中的每个节点上安装sklearn及其所有依赖项是否足够?

lsmepo6l

lsmepo6l1#

理论上,这应该是可能的,除非我不知道scikit有什么奇怪的地方。你只需要构建你的拓扑结构,这样你就可以用python来编写你的螺栓,我想你已经知道这是可能的,并且有很多例子。

相关问题