Uh oh!
There was an error while loading. Please reload this page.
[SPARK-23377][ML] Fixes Bucketizer with multiple columns persistence bug - #20566
[SPARK-23377][ML] Fixes Bucketizer with multiple columns persistence bug#20566viirya wants to merge 4 commits into
Conversation
SparkQA
commented
Feb 10, 2018
Test build #87283 has finished for PR 20566 at commit
|
mgaido91
left a comment
There was a problem hiding this comment.
I am just wondering whether we should persist the default params too (in case they are changed across multiple versions) but in a separate section. WDYT?
There was a problem hiding this comment.
can't we just make paramMapprivate[ml]?
There was a problem hiding this comment.
In this way I think you can also avoid the MiMa failure...
There was a problem hiding this comment.
Looks like it still can't avoid the MiMa failure.
viirya
commented
Feb 10, 2018
@mgaido91 I also considered the issue of changed default values across versions. I'm not sure which is more reasonable, using old version's default value or using current version's default value. |
mgaido91
commented
Feb 10, 2018
@viirya that's a good question. Honestly my idea is that if the user doesn't set a value, he/she doesn't care about it, so it is good to use the new version default IMHO. But it is also true that changing a default may cause unexpected behavior in user code. So, it LGTM, but I'd like to hear others' opinion on this too. |
viirya
commented
Feb 10, 2018
Yeah, IMHO, when the user loads a model from old version into new version to run, I think it is reasonable to run it with current default value because the param is not explicitly set and should use "default" value of current system. Thanks for your comment. Let's wait for others' option. |
SparkQA
commented
Feb 10, 2018
Test build #87285 has finished for PR 20566 at commit
|
SparkQA
commented
Feb 10, 2018
Test build #87289 has finished for PR 20566 at commit
|
MrBago
commented
Feb 11, 2018
I believe this will break persistence for LogisticRegression. I believe the issue is that the I believe LinearRegression may have a similar issue. Our current tests don't seem to cover this kind of thing so I think we should improve test coverage if we want to make this kind of change. |
viirya
commented
Feb 11, 2018
Not only |
SparkQA
commented
Feb 11, 2018
Test build #87299 has finished for PR 20566 at commit
|
SparkQA
commented
Feb 11, 2018
Test build #87301 has finished for PR 20566 at commit
|
viirya
commented
Feb 11, 2018
retest this please. |
SparkQA
commented
Feb 11, 2018
Test build #87302 has finished for PR 20566 at commit
|
viirya
commented
Feb 11, 2018
jkbradley
commented
Feb 12, 2018
Thanks for the patch @viirya |
viirya
commented
Feb 13, 2018
@jkbradley Thanks! I will post the problem and proposed design on the JIRA. |
viirya
commented
Feb 13, 2018
I'd close this and favor the quick fix #20594 based on the discussion in JIRA. Will re-open it if it is needed later. |
What changes were proposed in this pull request?
Since 2.3,
Bucketizersupports multiple input/output columns. We will check if exclusive params are set during transformation. E.g., ifinputColsandoutputColare both set, an error will be thrown.However, when we write
Bucketizer, looks like the default params and user-supplied params are merged during writing. All saved params are loaded back and set to created model instance. So the defaultoutputColparam inHasOutputColtrait will be set inparamMapand become an user-supplied param. That makes the check of exclusive params failed.This patch changes
DefaultParamsWriterand only save user-supplied params.The multi-column
QuantileDiscretizeralso has the same issue.How was this patch tested?
Modified test.