Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/18428#discussion_r124185896
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/tuning/ValidatorParams.scala ---
@@ -126,10 +126,22 @@ private[ml] object ValidatorParams {
extraMetadata: Option[JObject] = None): Unit = {
import org.json4s.JsonDSL._
+ var numParamsNotJson = 0
val estimatorParamMapsJson = compact(render(
instance.getEstimatorParamMaps.map { case paramMap =>
paramMap.toSeq.map { case ParamPair(p, v) =>
- Map("parent" -> p.parent, "name" -> p.name, "value" ->
p.jsonEncode(v))
+ v match {
+ case writeableObj: MLWritable =>
--- End diff --
Per my comment below in the load() section, this should be restricted to
DefaultParamsWritable for now. Could you please do so, but also add a check
which throws an error if `v` is MLWritable but not DefaultParamsWritable?
---
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]