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

    https://github.com/apache/spark/pull/22764#discussion_r226835456
  
    --- 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 --
    
    @WeichenXu123 I have explained it in  and  
https://github.com/apache/spark/pull/22764#discussion_r226693546. If you don't 
agree or believe on what I said you can try it.
    
    A model saved in 2.3.1 will have "1.0" as version. So this code is not run. 
Every model from 2.4.0 on, will be saved with "2.0" as version, so it will have 
this stored. As mentioned, please notice that `SaveLoadV2_0` was introduced for 
2.4.0. Of course, if this commit won't go in 2.4, then I'll have to create a 
`SaveLoadV3_0` in order to support it (or, if we agree that this doesn't need 
to be restored after model persistence, we can just ignore it).
    
    Hope this clarifies. Thanks.


---

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

Reply via email to