TensorFlowOnSpark brings scalable deep learning to Apache Hadoop and Apache Spark clusters.
By combining salient features from the TensorFlow deep learning framework with Apache Spark and Apache Hadoop, TensorFlowOnSpark enables distributed deep learning on a cluster of GPU and CPU servers.
It enables both distributed TensorFlow training and inferencing on Spark clusters, with a goal to minimize the amount of code changes required to run existing TensorFlow programs on a shared grid. Its Spark-compatible API helps manage the TensorFlow cluster with the following steps:
TFNode.DataFeed
class. Note that we leverage the Hadoop Input/Output Format to access TFRecords on HDFS.TensorFlowOnSpark was developed by Yahoo for large-scale distributed deep learning on our Hadoop clusters in Yahoo's private cloud.
TensorFlowOnSpark provides some important benefits (see our blog) over alternative deep learning solutions.
TensorFlowOnSpark is provided as a pip package, which can be installed on single machines via:
# for tensorflow>=2.0.0
pip install tensorflowonspark
# for tensorflow<2.0.0
pip install tensorflowonspark==1.4.4
For distributed clusters, please see our wiki site for detailed documentation for specific environments, such as our getting started guides for single-node Spark Standalone, YARN clusters and AWS EC2. Note: the Windows operating system is not currently supported due to this issue.
To use TensorFlowOnSpark with an existing TensorFlow application, you can follow our Conversion Guide to describe the required changes. Additionally, our wiki site has pointers to some presentations which provide an overview of the platform.
Note: since TensorFlow 2.x breaks API compatibility with TensorFlow 1.x, the examples have been updated accordingly. If you are using TensorFlow 1.x, you will need to checkout the v1.4.4
tag for compatible examples and instructions.
API Documentation is automatically generated from the code.
Please join the TensorFlowOnSpark user group for discussions and questions. If you have a question, please review our FAQ before posting.
Contributions are always welcome. For more information, please see our guide for getting involved.
The use and distribution terms for this software are covered by the Apache 2.0 license. See LICENSE file for terms.