[SPARK-23469][ML] HashingTF should use corrected MurmurHash3 implementation#25303
Closed
huaxingao wants to merge 4 commits intoapache:masterfrom
Closed
[SPARK-23469][ML] HashingTF should use corrected MurmurHash3 implementation#25303huaxingao wants to merge 4 commits intoapache:masterfrom
huaxingao wants to merge 4 commits intoapache:masterfrom
Conversation
|
Test build #108419 has finished for PR 25303 at commit
|
mllib/src/test/scala/org/apache/spark/ml/feature/HashingTFSuite.scala
Outdated
Show resolved
Hide resolved
| assert(hashingTF.indexOf("d") === 90) | ||
| } | ||
|
|
||
| test("Load HashingTF prior to Spark 3.0") { |
Member
There was a problem hiding this comment.
Since this is a compatibility bug fix, could you add SPARK-23469 prefix?
|
Test build #108421 has finished for PR 25303 at commit
|
|
Test build #108422 has finished for PR 25303 at commit
|
srowen
reviewed
Jul 31, 2019
| // We support loading old `HashingTF` saved by previous Spark versions. | ||
| // Previous `HashingTF` uses `mllib.feature.HashingTF.murmur3Hash`, but new `HashingTF` uses | ||
| // `ml.Feature.FeatureHasher.murmur3Hash`. | ||
| val (majorVersion, minorVersion) = majorMinorVersion(metadata.sparkVersion) |
Member
There was a problem hiding this comment.
Oh good catch here.
Nit: you can replace minorVersion with _ just for tidiness
|
Test build #108478 has finished for PR 25303 at commit
|
srowen
approved these changes
Aug 1, 2019
Member
|
Merged to master. I added a release note for this change. |
Contributor
Author
|
Thanks for your help! @srowen @dongjoon-hyun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Update HashingTF to use new implementation of MurmurHash3
Make HashingTF use the old MurmurHash3 when a model from pre 3.0 is loaded
How was this patch tested?
Change existing unit tests. Also add one unit test to make sure HashingTF use the old MurmurHash3 when a model from pre 3.0 is loaded