Github user holdenk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19876#discussion_r176821909
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/util/ReadWrite.scala ---
    @@ -86,7 +88,80 @@ private[util] sealed trait BaseReadWrite {
     }
     
     /**
    - * Abstract class for utility classes that can save ML instances.
    + * Implemented by objects that provide ML exportability.
    + *
    + * A new instance of this class will be instantiated each time a save call 
is made.
    + *
    + * Must have a valid zero argument constructor which will be called to 
instantiate.
    + *
    + * @since 2.3.0
    + */
    +@InterfaceStability.Unstable
    +@Since("2.3.0")
    +trait MLWriterFormat {
    +  /**
    +   * Function to write the provided pipeline stage out.
    +   *
    +   * @param path  The path to write the result out to.
    +   * @param session  SparkSession associated with the write request.
    +   * @param optionMap  User provided options stored as strings.
    +   * @param stage  The pipeline stage to be saved.
    +   */
    +  @Since("2.3.0")
    +  def write(path: String, session: SparkSession, optionMap: 
mutable.Map[String, String],
    +    stage: PipelineStage): Unit
    +}
    +
    +/**
    + * 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 save call 
is made.
    --- End diff --
    
    Add a comment about zero arg constructor requirement


---

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

Reply via email to