synapse.ml.cntk package

Submodules

synapse.ml.cntk.CNTKModel module

class synapse.ml.cntk.CNTKModel.CNTKModel(java_obj=None, batchInput=True, convertOutputToDenseVector=True, feedDict={'ARGUMENT_0': 'ARGUMENT_0'}, fetchDict={'OUTPUT_0': 'OUTPUT_0'}, miniBatcher=None, model=None)[source]

Bases: synapse.ml.cntk._CNTKModel._CNTKModel

Parameters
  • SparkSession (SparkSession) – The SparkSession that will be used to find the model

  • location (str) – The location of the model, either on local or HDFS

getInputCol()[source]
getInputNode()[source]
getInputNodeIndex()[source]
getInputShapes()[source]
getOutputCol()[source]
getOutputNode()[source]
getOutputNodeIndex()[source]
rebroadcastCNTKModel(sparkSession)[source]
setFeedDict(dict)[source]
Parameters

feedDict – Provide a map from CNTK/ONNX model input variable names (keys) to column names of the input dataframe (values)

setFetchDict(dict)[source]
Parameters

fetchDict – Provide a map from column names of the output dataframe (keys) to CNTK/ONNX model output variable names (values)

setInputCol(n)[source]
setInputNode(n)[source]
setInputNodeIndex(n)[source]
setMiniBatchSize(n)[source]
setModelLocation(location)[source]
setOutputCol(n)[source]
setOutputNode(n)[source]
setOutputNodeIndex(n)[source]

synapse.ml.cntk.ImageFeaturizer module

class synapse.ml.cntk.ImageFeaturizer.ImageFeaturizer(java_obj=None, cntkModel=None, cutOutputLayers=1, dropNa=True, inputCol=None, layerNames=None, outputCol='ImageFeaturizer_bbca18cd1be0_output')[source]

Bases: synapse.ml.cntk._ImageFeaturizer._ImageFeaturizer

Parameters
  • SparkSession (SparkSession) – The SparkSession that will be used to find the model

  • ocation (str) – The location of the model, either on local or HDFS

setMiniBatchSize(size)[source]
setModel(modelSchema)[source]
setModelLocation(location)[source]

Module contents

SynapseML is an ecosystem of tools aimed towards expanding the distributed computing framework Apache Spark in several new directions. SynapseML adds many deep learning and data science tools to the Spark ecosystem, including seamless integration of Spark Machine Learning pipelines with Microsoft Cognitive Toolkit (CNTK), LightGBM and OpenCV. These tools enable powerful and highly-scalable predictive and analytical models for a variety of datasources.

SynapseML also brings new networking capabilities to the Spark Ecosystem. With the HTTP on Spark project, users can embed any web service into their SparkML models. In this vein, SynapseML provides easy to use SparkML transformers for a wide variety of Microsoft Cognitive Services. For production grade deployment, the Spark Serving project enables high throughput, sub-millisecond latency web services, backed by your Spark cluster.

SynapseML requires Scala 2.12, Spark 3.0+, and Python 3.6+.