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

    https://github.com/apache/spark/pull/18428#discussion_r124185775
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/tuning/ValidatorParams.scala ---
    @@ -183,8 +195,14 @@ private[ml] object ValidatorParams {
               val paramPairs = pMap.map { case pInfo: Map[String, String] =>
                 val est = uidToParams(pInfo("parent"))
                 val param = est.getParam(pInfo("name"))
    -            val value = param.jsonDecode(pInfo("value"))
    -            param -> value
    +            if (pInfo("isJson").toBoolean.booleanValue()) {
    +              val value = param.jsonDecode(pInfo("value"))
    +              param -> value
    +            } else {
    +              val path = param.jsonDecode(pInfo("value")).toString
    +              val value = 
DefaultParamsReader.loadParamsInstance[MLWritable](path, sc)
    --- End diff --
    
    This is OK with me for now since it will address all cases I've seen.  In 
the future, it'd be great to make this more general by allowing it to read any 
MLReadable type (not just DefaultParamsReadable).  I'll comment in the save() 
section above about this too.


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

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

Reply via email to