Github user mgaido91 commented on a diff in the pull request: https://github.com/apache/spark/pull/22764#discussion_r226693546 --- 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 -- The answer is yes, because of versioning: - all the versions of Spark released so far, use the versions `"1.0"`, which is loaded/written with the `SaveLoadV1_0` class (see https://github.com/apache/spark/pull/22764/files#diff-458b0e49bfc4a4dd993ea6cb66af4b4dR125); - there can't be a model with version `"2.0"` without `trainingCost`, because `SaveLoadV2_0` was introduced in a previous commit which lands only on 2.4 and has not yet been released.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org