spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] zhengruifeng commented on a change in pull request #27011: [SPARK-30354][ML] GBT reuse DecisionTreeMetadata among iterations
Date Fri, 27 Dec 2019 05:19:07 GMT
zhengruifeng commented on a change in pull request #27011: [SPARK-30354][ML] GBT reuse DecisionTreeMetadata
among iterations
URL: https://github.com/apache/spark/pull/27011#discussion_r361583617
 
 

 ##########
 File path: mllib/src/main/scala/org/apache/spark/ml/tree/impl/RandomForest.scala
 ##########
 @@ -122,8 +132,9 @@ private[spark] object RandomForest extends Logging with Serializable
{
     timer.start("init")
 
     val retaggedInput = input.retag(classOf[Instance])
-    val metadata =
+    val metadata = precomputedMetadata.getOrElse {
 
 Review comment:
   > are there callers that can't precompute and pass this
   
   this method is indirectly used in DecisionTree/RandomForest in both .ml/.mllib sides.
   Other algs will compute `DecisionTreemetadata` only once, in this method.
   
   It will cause many changes if we precomupte `DecisionTreemetadata` outside and pass it
to this method.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message