Github user MLnick commented on a diff in the pull request:
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/util/ReadWrite.scala ---
    @@ -446,6 +463,20 @@ private[ml] object DefaultParamsReader {
         val cls = Utils.classForName(metadata.className)
    +  def loadAndSetInitialModel[M <: Model[M]](
    +      instance: HasInitialModel[M], metadata: Metadata, path: String, sc: 
SparkContext): Unit = {
    +    implicit val format = DefaultFormats
    +    // Try to load the initial model
    --- End diff --
    What about just wrapping the load initial model in a `Try`? That way there 
is no need to rely on metadata. It will fail if the "initialModel" path doesn't 
exist. We can ignore that exception but throw (or log) if we encounter an error 
in the actual loading.

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

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to