-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-25793][ML]call SaveLoadV2_0.load for classNameV2_0 #22790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -109,10 +109,10 @@ class BisectingKMeansModel private[clustering] ( | |
|
|
||
| @Since("2.0.0") | ||
| override def save(sc: SparkContext, path: String): Unit = { | ||
| BisectingKMeansModel.SaveLoadV1_0.save(sc, this, path) | ||
| BisectingKMeansModel.SaveLoadV2_0.save(sc, this, path) | ||
| } | ||
|
|
||
| override protected def formatVersion: String = "1.0" | ||
| override protected def formatVersion: String = "2.0" | ||
| } | ||
|
|
||
| @Since("2.0.0") | ||
|
|
@@ -126,7 +126,7 @@ object BisectingKMeansModel extends Loader[BisectingKMeansModel] { | |
| val model = SaveLoadV1_0.load(sc, path) | ||
| model | ||
| case (SaveLoadV2_0.thisClassName, SaveLoadV2_0.thisFormatVersion) => | ||
| val model = SaveLoadV1_0.load(sc, path) | ||
| val model = SaveLoadV2_0.load(sc, path) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there no test to verify calling correct load method?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can improve the write/load model tests in order to include also a different distance measure from the default one. In this way we should catch this error. Thanks.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have ever use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| model | ||
| case _ => throw new Exception( | ||
| s"BisectingKMeansModel.load did not recognize model with (className, format version):" + | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @mgaido91
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, nice catch!
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a regression, but it looks like a correctness or data loss issue at Spark 2.4.0 new feature.
Do you know why https://issues.apache.org/jira/browse/SPARK-25793 is created as a
MinorandDocumentationissue?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @cloud-fan