Last active
May 10, 2019 01:14
-
-
Save benoitdescamps/941979fc6912515c40f8ee2857ad7f73 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyspark.sql import SparkSession | |
from tensorflowonspark import TFCluster, TFNode | |
spark = SparkSession \ | |
.builder \ | |
.config("...") | |
.appName("model-training") \ | |
.getOrCreate() | |
spark.sparkContext.addPyFile("/usr/local/tensorflow/tfspark-{version}.zip") | |
cluster = TFCluster.run(spark.sparkContext,\ | |
map_fun,\ | |
args, \ | |
num_executors=num_executors, \ | |
num_ps=num_ps,\ | |
tensorboard=False,\ | |
driver_ps_nodes=False,\ | |
input_mode=TFCluster.InputMode.SPARK) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment