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

    https://github.com/apache/spark/pull/7705#discussion_r35791645
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAModel.scala ---
    @@ -546,32 +688,41 @@ object DistributedLDAModel extends 
Loader[DistributedLDAModel] {
         implicit val formats = DefaultFormats
         val expectedK = (metadata \ "k").extract[Int]
         val vocabSize = (metadata \ "vocabSize").extract[Int]
    -    val docConcentration = (metadata \ "docConcentration").extract[Double]
    +    val docConcentration =
    +      Vectors.dense((metadata \ 
"docConcentration").extract[Seq[Double]].toArray)
         val topicConcentration = (metadata \ 
"topicConcentration").extract[Double]
         val iterationTimes = (metadata \ "iterationTimes").extract[Seq[Double]]
    +    val gammaShape = (metadata \ "gammaShape").extract[Double]
         val classNameV1_0 = SaveLoadV1_0.classNameV1_0
     
         val model = (loadedClassName, loadedVersion) match {
           case (className, "1.0") if className == classNameV1_0 => {
             DistributedLDAModel.SaveLoadV1_0.load(
    -          sc, path, vocabSize, docConcentration, topicConcentration, 
iterationTimes.toArray)
    +          sc,
    --- End diff --
    
    OK


---
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