-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-22450][Core][MLLib][FollowUp] safely register class for mllib - LabeledPoint/VectorWithNorm/TreePoint #19950
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
Conversation
srowen
left a comment
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.
OK. Was thinking it's kind of overkill to make new test suites to test that each of several classes serializes via the same mechanism. I'd imagine one test case for all of them is fine, somewhere. I don't feel strongly about it.
|
Test build #84765 has finished for PR 19950 at commit
|
183868c to
024d835
Compare
|
Test build #84824 has finished for PR 19950 at commit
|
|
Test build #84828 has finished for PR 19950 at commit
|
|
Since |
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.
Nit: space before brace
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.
Is there much value in defining this method?
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.
I also think there is not much value to do this, although current testsuites are all like this.
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.
Likewise these seem like things you can just write in a loop over several objects to test
024d835 to
daba630
Compare
|
Test build #85085 has finished for PR 19950 at commit
|
|
Test build #85084 has finished for PR 19950 at commit
|
| "org.apache.spark.ml.feature.OffsetInstance" | ||
| "org.apache.spark.ml.feature.OffsetInstance", | ||
| "org.apache.spark.ml.feature.LabeledPoint", | ||
| "org.apache.spark.ml.tree.impl.TreePoint" |
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.
I recommend to write these items in alphabet order, so we can easily check whether it miss some item and easier to add more items in the future.
|
And, these items added cannot cover the case in |
|
@WeichenXu123 I am not very sure, but it seems that |
|
@cloud-fan Does it works like: If A and B are any class which is registered, then Type Tuple2[A, B] will be automatically registered for kyro ? It looks like kyro will automatically handle any Tuple types, as long as inner type in Tuple being registered. |
|
Test build #85147 has finished for PR 19950 at commit
|
|
Test build #85148 has finished for PR 19950 at commit
|
|
Merged to master |
What changes were proposed in this pull request?
register following classes in Kryo:
org.apache.spark.mllib.regression.LabeledPointorg.apache.spark.mllib.clustering.VectorWithNormorg.apache.spark.ml.feature.LabeledPointorg.apache.spark.ml.tree.impl.TreePointorg.apache.spark.ml.tree.impl.BaggedPointseems also need to be registered, but I don't know how to do it in this safe way.@WeichenXu123 @cloud-fan
How was this patch tested?
added tests