在Spark集群上使用常规python代码 [英] Using regular python code on a Spark cluster
问题描述
我可以在Spark集群中使用常规ML库(例如Tensorflow或sci-kit learning)运行普通的python代码吗?如果是,spark可以在整个集群中分布我的数据和计算吗?如果没有,为什么?
Can I run a normal python code using regular ML libraries (e.g., Tensorflow or sci-kit learn) in a Spark cluster? If yes, can spark distribute my data and computation across the cluster? if no, why?
推荐答案
Spark使用RDD(弹性分布式数据集)在工人或奴隶之间分配工作,我不认为你可以在python中使用您现有的代码,而无需极大地修改代码以符合spark规范,对于tensorflow,有很多选项可以在多个gpu上分布计算。
Spark use RDD(Resilient distributed dataset) to distribute work among workers or slaves , I dont think you can use your existing code in python without dramatically adapting the code to spark specification , for tensorflow there are many options to distribute computing over multiple gpus.
这篇关于在Spark集群上使用常规python代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!