zhengruifeng commented on a change in pull request #30548:
URL: https://github.com/apache/spark/pull/30548#discussion_r534606206
##########
File path: mllib/src/main/scala/org/apache/spark/ml/feature/Word2Vec.scala
##########
@@ -278,34 +279,45 @@ class Word2VecModel private[ml] (
@Since("1.4.0")
def setOutputCol(value: String): this.type = set(outputCol, value)
+ private var bcModel: Broadcast[Word2VecModel] = _
Review comment:
yes. I followed the impl of
[CountVectorizer](https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/ml/feature/CountVectorizer.scala#L302)
here.
Since other .ml impls do not use a mutable `var` for a broadcast variable
like this, I will remove this var.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]