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

    https://github.com/apache/spark/pull/16480#discussion_r94861932
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/util/Instrumentation.scala ---
    @@ -85,9 +86,27 @@ private[spark] class Instrumentation[E <: Estimator[_]] 
private (
       }
     
       /**
    +   * Log params for tuning estimators that search for the best params by 
wrapping another
    +   * estimator and using metrics computed by an evaluator.
    +   *
    +   * @param estimator the inner estimator called by the tuning estimator
    +   * @param estimatorParamMaps different params tried by the tuning 
estimator
    +   * @param evaluator evaluator used to compute the metric for each 
estimator param value
    +   */
    +  def logTuningParams(
    +    estimator: Estimator[_],
    +    estimatorParamMaps: Array[ParamMap],
    +    evaluator: Evaluator): Unit = {
    +    log(compact(render(map2jvalue(Map[String, JValue](
    +      "estimator" -> estimator.getClass.getSimpleName,
    +      "evaluator" -> evaluator.getClass.getSimpleName,
    +      "numModels" -> estimatorParamMaps.length)))))
    +  }
    +
    +  /**
        * Logs the value with customized name field.
        */
    -  def logNamedValue(name: String, num: Long): Unit = {
    +  def logNamedValue(name: String, num: JValue): Unit = {
    --- End diff --
    
    Since this class doesn't expose json4s APIs, let's stick with basic types 
in the public API.  Just do String for now (since the Long version is not yet 
used).


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