spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sethah <...@git.apache.org>
Subject [GitHub] spark pull request #19876: [ML][SPARK-11171][SPARK-11239] Add PMML export to...
Date Tue, 09 Jan 2018 19:42:45 GMT
Github user sethah commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19876#discussion_r160503640
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/util/ReadWrite.scala ---
    @@ -85,12 +87,55 @@ private[util] sealed trait BaseReadWrite {
       protected final def sc: SparkContext = sparkSession.sparkContext
     }
     
    +/**
    + * ML export formats for should implement this trait so that users can specify a shortname
rather
    + * than the fully qualified class name of the exporter.
    + *
    + * A new instance of this class will be instantiated each time a DDL call is made.
    + *
    + * @since 2.3.0
    + */
    +@InterfaceStability.Evolving
    +trait MLFormatRegister {
    +  /**
    +   * The string that represents the format that this data source provider uses. This
is
    +   * overridden by children to provide a nice alias for the data source. For example:
    +   *
    +   * {{{
    +   *   override def shortName(): String =
    +   *       "pmml+org.apache.spark.ml.regression.LinearRegressionModel"
    +   * }}}
    +   * Indicates that this format is capable of saving Spark's own LinearRegressionModel
in pmml.
    +   *
    +   * Format discovery is done using a ServiceLoader so make sure to list your format
in
    +   * META-INF/services.
    +   * @since 2.3.0
    +   */
    +  def shortName(): String
    +}
    +
    +/**
    + * Implemented by objects that provide ML exportability.
    + *
    + * A new instance of this class will be instantiated each time a DDL call is made.
    + *
    + * @since 2.3.0
    + */
    +@InterfaceStability.Evolving
    +trait MLWriterFormat {
    --- End diff --
    
    do we need the actual since annotations here, though?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message