Submodules module


Bases: object

Extension methods over Spark DataFrame

static get_spark_session(df: DataFrame) SparkSession[source]

get the associated Spark session


df (DataFrame) – the dataframe of which we want to get its Spark session

static make_empty(df: DataFrame) DataFrame[source]

make an empty dataframe with the same schema

  • use (df dataframe whose schema we wish to) –

  • dataframe (Returns empty) –

  • -------

static zip_with_index(df: DataFrame, start_index: int = 0, col_name: str = 'rowId', partition_col: Union[List[str], str] = [], order_by_col: Union[List[str], str] = []) DataFrame[source]

add an index to the given dataframe

  • df (dataframe) – the dataframe to add the index to

  • start_index (int) – the value to start the count from

  • col_name (str) – the name of the index column which will be added as last column in the output data frame

  • partition_col (Union[List[str], str]) – optional column name or list of columns names that define a partitioning to assign indices independently to, e.g., assign sequential indices separately to each distinct tenant

  • order_by_col (Union[List[str], str]) – optional order by column name or list of columns that are used for sorting the data frame or partitions before indexing


Bases: object

static build(explainable: Any, **kwargs)[source]
static copy_params(from_explainable: Any, to_explainable: Any)[source]
static get_method(the_explainable, the_method_name)[source]
static get_methods(the_explainable)[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+.