Skip to content

Commit

Permalink
[SPARK-51150][ML][FOLLOW-UP] Pass session in OneVsRestParams.saveImpl
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
followup of #49871

I don't find other similar place in jvm side

### Why are the changes needed?
avoid session recreation

### Does this PR introduce _any_ user-facing change?
no

### How was this patch tested?
ci

### Was this patch authored or co-authored using generative AI tooling?
no

Closes #50003 from zhengruifeng/ml_ovr_session.

Lead-authored-by: Ruifeng Zheng <[email protected]>
Co-authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
  • Loading branch information
zhengruifeng and HyukjinKwon committed Feb 20, 2025
1 parent 6603a4e commit 35442ba
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private[ml] object OneVsRestParams extends ClassifierTypeTrait {
DefaultParamsWriter.saveMetadata(instance, path, spark, extraMetadata, Some(jsonParams))

val classifierPath = new Path(path, "classifier").toString
instance.getClassifier.asInstanceOf[MLWritable].save(classifierPath)
instance.getClassifier.asInstanceOf[MLWritable].write.session(spark).save(classifierPath)
}

def loadImpl(
Expand Down

0 comments on commit 35442ba

Please sign in to comment.