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

    https://github.com/apache/spark/pull/22764#discussion_r226826701
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/clustering/BisectingKMeansModel.scala
 ---
    @@ -225,13 +227,14 @@ object BisectingKMeansModel extends 
Loader[BisectingKMeansModel] {
           assert(formatVersion == thisFormatVersion)
           val rootId = (metadata \ "rootId").extract[Int]
           val distanceMeasure = (metadata \ "distanceMeasure").extract[String]
    +      val trainingCost = (metadata \ "trainingCost").extract[Double]
    --- End diff --
    
    @mgaido91 
    (I haven't test this, so correct me if I am wrong).
    > I don't see (and think) this change breaks backwards compatibility for 
mllib.
    
    I am suspicious of this line:
    ```
    val trainingCost = (metadata \ "trainingCost").extract[Double]
    ```
    When loading an old version spark saved `BisectingKMeansModel`, because it 
do not contain "trainingCost" info, I guess this line will throw error. 
(Otherwise what will it return ?)



---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to