Github user hhbyyh commented on a diff in the pull request:
https://github.com/apache/spark/pull/17280#discussion_r164942458
--- Diff: mllib/src/main/scala/org/apache/spark/ml/fpm/FPGrowth.scala ---
@@ -319,9 +323,11 @@ object FPGrowthModel extends MLReadable[FPGrowthModel]
{
override def load(path: String): FPGrowthModel = {
val metadata = DefaultParamsReader.loadMetadata(path, sc, className)
+ implicit val format = DefaultFormats
+ val numTrainingRecords = (metadata.metadata \
"numTrainingRecords").extract[Long]
--- End diff --
Since we're adding numTrainingRecords to FPGrowthModel and there isn't a
proper default number, I suggest we break the backward model loading
compatibility. Otherwise we need to fill numTrainingRecords with an incorrect
value and will likely create a maintenance trap.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]