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

    https://github.com/apache/spark/pull/14112#discussion_r70335212
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala ---
    @@ -574,18 +578,28 @@ object LocalLDAModel extends 
MLReadable[LocalLDAModel] {
           val metadata = DefaultParamsReader.loadMetadata(path, sc, className)
           val dataPath = new Path(path, "data").toString
           val data = sparkSession.read.parquet(dataPath)
    -        .select("vocabSize", "topicsMatrix", "docConcentration", 
"topicConcentration",
    -          "gammaShape")
    -        .head()
    -      val vocabSize = data.getAs[Int](0)
    -      val topicsMatrix = data.getAs[Matrix](1)
    -      val docConcentration = data.getAs[Vector](2)
    -      val topicConcentration = data.getAs[Double](3)
    -      val gammaShape = data.getAs[Double](4)
    +      val vectorConverted = MLUtils.convertVectorColumnsToML(data, 
"docConcentration")
    +      val Row(vocabSize: Int, topicsMatrix: Matrix, docConcentration: 
Vector,
    +      topicConcentration: Double, gammaShape: Double) = 
MLUtils.convertMatrixColumnsToML(
    +        vectorConverted, "topicsMatrix").select("vocabSize", 
"topicsMatrix", "docConcentration",
    +        "topicConcentration", "gammaShape").head()
           val oldModel = new OldLocalLDAModel(topicsMatrix, docConcentration, 
topicConcentration,
    -        gammaShape)
    +         gammaShape)
           val model = new LocalLDAModel(metadata.uid, vocabSize, oldModel, 
sparkSession)
    -      DefaultParamsReader.getAndSetParams(model, metadata)
    +      implicit val format = DefaultFormats
    +           metadata.params match {
    +              case JObject(pairs) =>
    +                  pairs.foreach { case (paramName, jsonValue) =>
    +                      val variable =
    --- End diff --
    
    rename for clarity: "variable" -> "origParam"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to