WeichenXu123 commented on code in PR #50106: URL: https://github.com/apache/spark/pull/50106#discussion_r1980987063
########## mllib/src/main/scala/org/apache/spark/ml/classification/FMClassifier.scala: ########## @@ -312,6 +322,18 @@ class FMClassificationModel private[classification] ( copyValues(new FMClassificationModel(uid, intercept, linear, factors), extra) } + override def estimatedSize: Long = { + var size = this.estimateMatadataSize + size += java.lang.Double.BYTES // intercept + if (this.linear != null) { + size += this.linear.getSizeInBytes + } + if (this.factors != null) { + size += this.factors.getSizeInBytes + } + size + } Review Comment: why not make this share common code with `estimateModelSize` ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org