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

    https://github.com/apache/spark/pull/14922#discussion_r77356253
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
 ---
    @@ -295,6 +295,13 @@ class LogisticRegression @Since("1.2.0") (
         instr.logParams(regParam, elasticNetParam, standardization, threshold,
           maxIter, tol, fitIntercept)
     
    +    val autoAggregationDepth =
    +      if ($(aggregationDepth) > 0) $(aggregationDepth)
    +      else getAggregationDepthByFormula(
    +        instances.context.getConf.getSizeAsBytes("spark.driver.memory", 
"1g"),
    --- End diff --
    
    oh, that is because, when user not set "spark.driver.memory", spark will 
set it as "1g" automatically,
    but in such case `context.getConf.getSizeAsBytes("spark.driver.memory")` 
will throw NoSuchElement exception. so I need to get the spark internal default 
value `1g`, is there a better way?


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