spark-ml-serving-2_0


License

License

GroupId

GroupId

io.hydrosphere
ArtifactId

ArtifactId

spark-ml-serving-2_0_2.11
Last Version

Last Version

0.3.3
Release Date

Release Date

Type

Type

jar
Description

Description

spark-ml-serving-2_0
spark-ml-serving-2_0
Project URL

Project URL

https://github.com/Hydrospheredata/spark-ml-serving
Project Organization

Project Organization

io.hydrosphere
Source Code Management

Source Code Management

https://github.com/Hydrospheredata/spark-ml-serving.git

Download spark-ml-serving-2_0_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/io.hydrosphere/spark-ml-serving-2_0_2.11/ -->
<dependency>
    <groupId>io.hydrosphere</groupId>
    <artifactId>spark-ml-serving-2_0_2.11</artifactId>
    <version>0.3.3</version>
</dependency>
// https://jarcasting.com/artifacts/io.hydrosphere/spark-ml-serving-2_0_2.11/
implementation 'io.hydrosphere:spark-ml-serving-2_0_2.11:0.3.3'
// https://jarcasting.com/artifacts/io.hydrosphere/spark-ml-serving-2_0_2.11/
implementation ("io.hydrosphere:spark-ml-serving-2_0_2.11:0.3.3")
'io.hydrosphere:spark-ml-serving-2_0_2.11:jar:0.3.3'
<dependency org="io.hydrosphere" name="spark-ml-serving-2_0_2.11" rev="0.3.3">
  <artifact name="spark-ml-serving-2_0_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.hydrosphere', module='spark-ml-serving-2_0_2.11', version='0.3.3')
)
libraryDependencies += "io.hydrosphere" % "spark-ml-serving-2_0_2.11" % "0.3.3"
[io.hydrosphere/spark-ml-serving-2_0_2.11 "0.3.3"]

Dependencies

compile (7)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.8
org.json4s : json4s-native_2.11 jar 3.2.11
com.twitter : parquet-hadoop-bundle jar 1.6.0
org.apache.parquet : parquet-common jar 1.7.0
org.apache.parquet : parquet-column jar 1.7.0
org.apache.parquet : parquet-hadoop jar 1.7.0
org.apache.parquet : parquet-avro jar 1.7.0

provided (1)

Group / Artifact Type Version
org.apache.spark : spark-mllib_2.11 jar 2.0.2

test (2)

Group / Artifact Type Version
org.scalactic : scalactic_2.11 jar 3.0.3
org.scalatest : scalatest_2.11 jar 3.0.3

Project Modules

There are no modules declared in this project.

Build Status

Spark-ml-serving

Contextless ML implementation of Spark ML.

Proposal

To serve small ML pipelines there is no need to create SparkContext and use cluster-related features. In this project we made our implementations for ML Transformers. Some of them call context-independent Spark methods.

Structure

Instead of using DataFrames, we implemented simple LocalData class to get rid of SparkContext. All Transformers are rewritten to accept LocalData.

How to use

  1. Import this project as dependency:
scalaVersion := "2.11.8"
// Artifact name is depends of what version of spark are you usng for model training:
// spark 2.0.x
libraryDependencies += Seq(
  "io.hydrosphere" %% "spark-ml-serving-2_0" % "0.3.0",
  "org.apache.spark" %% "spark-mllib" % "2.0.2"
)
// spark 2.1.x
libraryDependencies += Seq(
  "io.hydrosphere" %% "spark-ml-serving-2_1" % "0.3.0",
  "org.apache.spark" %% "spark-mllib" % "2.1.2"
)
// spark 2.2.x
libraryDependencies += Seq(
  "io.hydrosphere" %% "spark-ml-serving-2_2" % "0.3.0",
  "org.apache.spark" %% "spark-mllib" % "2.2.0"

)
  1. Use it: example
import io.hydrosphere.spark_ml_serving._
import LocalPipelineModel._

// ....
val model = LocalPipelineModel.load("PATH_TO_MODEL") // Load
val columns = List(LocalDataColumn("text", Seq("Hello!")))
val localData = LocalData(columns)
val result = model.transform(localData) // Transformed result

More examples of different ML models are in tests.

io.hydrosphere

hydrosphere.io

Versions

Version
0.3.3
0.3.2
0.3.1
0.3.0
0.2.2
0.2.1
0.2.0