Github user mpjlu commented on a diff in the pull request:
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/tree/impl/RandomForest.scala ---
    @@ -1107,9 +1108,11 @@ private[spark] object RandomForest extends Logging {
               .getOrElseUpdate(treeIndex, new mutable.HashMap[Int, 
               = new NodeIndexInfo(numNodesInGroup, featureSubset)
    +        numNodesInGroup += 1
    +        memUsage += nodeMemUsage
    +      } else {
    +        flag = false
    --- End diff --
    We cannot clear stack here, because the nodes in the stack are used for all 
    Native scala doesn't support break, we have to import other package to use 
break, seems not necessary. 
    We cannot use nodeStack.pop at the top, because we don't know whether it 
can be grouped here.
    How about change "flag" to "groupDone" means Group is done, don't need to 
loop again.

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to