Git Product home page Git Product logo

distributed-tf's Introduction

Distributed TensorFlow Example (O'Reilly Blog Post)

There are three pieces of example code here:

  • a Spark program to launch TensorFlow functions inside a Spark 'mapper' function. This is useful for hyperparameter optimization (parameter sweeps)

  • a TensorFlowOnSpark program that can be used with Hops Hadoop

  • a Horovod program that can be used with Hops Hadoop

Hyperparameter Optimization using Spark/TensorFlow

This has been tested on a Ubuntu 16.04 machine, but should work on other platforms. We recommend that you do the following inside a new conda environment, but you may also run it without a virtual environment.

# Download and install standalone Spark
wget http://apache.mirrors.spacedump.net/spark/spark-2.2.1/spark-2.2.1-bin-hadoop2.7.tgz
tar zxf spark-2.2.1-bin-hadoop2.7.tgz
export SPARK_HOME=$(pwd)/spark-2.2.1-bin-hadoop2.7
export PATH=$SPARK_HOME/bin:$PATH
pip install pyspark
pip install tensorflow==1.4.0
pip install jupyter
git clone https://github.com/hopshadoop/distributed-tf.git
cd distributed-tf

export PYSPARK_DRIVER_PYTHON=jupyter
export PYSPARK_DRIVER_PYTHON_OPTS='notebook'
pyspark
#The 'pyspark' command should start a Jupyter Notebook in your web browser. 
#You can then create a new 'pyspark' notebook and test it using this code

TensorFlowOnSpark

You can get more details on TensorFlowOnSpark at its github repo.

Horovod

More details on Horovod at its github repo.

Distributed TensorFlow on Hops

For details on how to install and setup Hops, so that you can run all three programs in a Tour, go to hops.io.

distributed-tf's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.