Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here are the usability issues with the existing APIs:

1) Params::containsloadJson() would only recognize parameters whose value has been explicitly set by and Params::settoJson(...).This means that even if users want to use the default value specified in the parameter definition, users would need to explicitly call Params::set(paramInfo, paramInfo.defaultValue) in order for this parameter to be recognized by Params::contains and Params::toJson etc), which are used to save/load a stage, can not guarantee the same parameter values will be used, if the default value defined in the ParamInfo changes.

This behavior makes it hard to guarantee consistent accuracy/performance of an existing Transformer/Estimator.

2) The existing Params::get() and Params::set() implementations always convert the value from/to json-formatted string, which could incur unnecessary performance overhead.

It is possible that an algorithm will want to set and get parameters one or more times before saving the model to disk. Ideally this should not involve value serialization and deserialization overhead.3) Param<?> class currently does not implement the Serializable interface. This would prevent classes such as Transformer/Estimator, which usually has parameter member variables, from being serializable.

Public Interfaces

1) We propose to replace WithParams/ParamInfo/ParamInfoFactory/Params with Param and WithParams as shown below. And it could be shown that the proposed interface and classes address all the issues described above.

...