Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/22236#discussion_r212833449
--- Diff: mllib/src/main/scala/org/apache/spark/ml/fpm/FPGrowth.scala ---
@@ -338,7 +355,16 @@ object FPGrowthModel extends MLReadable[FPGrowthModel]
{
val metadata = DefaultParamsReader.loadMetadata(path, sc, className)
val dataPath = new Path(path, "data").toString
val frequentItems = sparkSession.read.parquet(dataPath)
- val model = new FPGrowthModel(metadata.uid, frequentItems)
+ val itemSupportPath = new Path(path, "itemSupport")
+ val fs = FileSystem.get(sc.hadoopConfiguration)
+ val itemSupport = if (fs.exists(itemSupportPath)) {
+
sparkSession.read.parquet(itemSupportPath.toString).rdd.collect().map {
--- End diff --
How about `collectAsMap` here?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]