Uh oh!
There was an error while loading. Please reload this page.
[SPARK-32310][ML][PySpark][3.0] ML params default value parity - #29159
[SPARK-32310][ML][PySpark][3.0] ML params default value parity#29159huaxingao wants to merge 4 commits into
Conversation
huaxingao
commented
Jul 20, 2020
SparkQA
commented
Jul 20, 2020
Test build #126152 has finished for PR 29159 at commit
|
SparkQA
commented
Jul 20, 2020
Test build #126158 has finished for PR 29159 at commit
|
zhengruifeng
commented
Jul 20, 2020
retest this please |
SparkQA
commented
Jul 20, 2020
Test build #126176 has finished for PR 29159 at commit
|
srowen
commented
Jul 20, 2020
Jenkins retest this please |
SparkQA
commented
Jul 20, 2020
Test build #126189 has finished for PR 29159 at commit
|
huaxingao
commented
Jul 20, 2020
retest this please |
SparkQA
commented
Jul 20, 2020
Test build #126192 has finished for PR 29159 at commit
|
huaxingao
commented
Jul 20, 2020
retest this please |
SparkQA
commented
Jul 20, 2020
Test build #126193 has finished for PR 29159 at commit
|
huaxingao
commented
Jul 20, 2020
retest this please |
SparkQA
commented
Jul 20, 2020
Test build #126201 has finished for PR 29159 at commit
|
viirya
commented
Jul 20, 2020
retest this please |
viirya
commented
Jul 20, 2020
For backport PR, can you add [3.0] to the PR title? |
viirya
commented
Jul 20, 2020
SparkQA
commented
Jul 20, 2020
Test build #126203 has finished for PR 29159 at commit
|
huaxingao
commented
Jul 21, 2020
Sorry, fixed. @Fokko |
| assert(values === newValues, s"Values do not match on param ${p.name}.") | ||
| case (value, newValue) => | ||
| assert(value === newValue, s"Values do not match on param ${p.name}.") | ||
| if (value.isInstanceOf[Double] && value.asInstanceOf[Double].isNaN) { |
There was a problem hiding this comment.
Why we need this check?
If necessary, may change to:
case (value: Double, newValue: Double) =>
assert(value.isNaN && newValue.isNaN || value == newValue, ...)
There was a problem hiding this comment.
Before my change, this setDefault(strategy -> Imputer.mean, missingValue -> Double.NaN) is in Imputer. Now I moved this to ImputerParams so ImputerModel also has the default value of missingValue set to Double.NaN. In DefaultReadWriteTest, it compares the default value of missingValue in the original model and the loaded model, so I need to make the NaN comparison work.
SparkQA
commented
Jul 22, 2020
Test build #126304 has finished for PR 29159 at commit
|
huaxingao
commented
Jul 22, 2020
retest this please |
SparkQA
commented
Jul 22, 2020
Test build #126342 has finished for PR 29159 at commit
|
huaxingao
commented
Jul 22, 2020
retest this please |
SparkQA
commented
Jul 22, 2020
Test build #126346 has finished for PR 29159 at commit
|
huaxingao
commented
Jul 22, 2020
retest this please |
SparkQA
commented
Jul 22, 2020
Test build #126351 has finished for PR 29159 at commit
|
huaxingao
commented
Jul 22, 2020
retest this please |
SparkQA
commented
Jul 22, 2020
Test build #126353 has finished for PR 29159 at commit
|
huaxingao
commented
Jul 22, 2020
retest this please |
SparkQA
commented
Jul 22, 2020
Test build #126357 has finished for PR 29159 at commit
|
huaxingao
commented
Jul 22, 2020
retest this please |
| trainRatio = Param(Params._dummy(), "trainRatio", "Param for ratio between train and\ | ||
| validation data. Must be between 0 and 1.", typeConverter=TypeConverters.toFloat) | ||
| def __init__(self, *args): |
There was a problem hiding this comment.
You added *args many places. Just to make sure it is for consistency?
There was a problem hiding this comment.
Yes, it's for consistency.
SparkQA
commented
Jul 22, 2020
Test build #126362 has finished for PR 29159 at commit
|
viirya
commented
Jul 22, 2020
retest this please |
SparkQA
commented
Jul 22, 2020
Test build #126365 has finished for PR 29159 at commit
|
viirya
commented
Jul 22, 2020
retest this please |
SparkQA
commented
Jul 23, 2020
Test build #126366 has finished for PR 29159 at commit
|
huaxingao
commented
Jul 23, 2020
Jenkins, please make pip packaging tests pass! retest this please |
SparkQA
commented
Jul 23, 2020
Test build #126367 has finished for PR 29159 at commit
|
huaxingao
commented
Jul 24, 2020
@srowen Are you Okay with this? |
srowen
commented
Jul 24, 2020
Same as the version for master - looks OK if there are no API or behavior changes (that are not bug fixes). |
### What changes were proposed in this pull request? backporting the changes to 3.0 set params default values in trait Params for feature and tuning in both Scala and Python. ### Why are the changes needed? Make ML has the same default param values between estimator and its corresponding transformer, and also between Scala and Python. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Existing and modified tests Closes#29159 from huaxingao/set_default_3.0. Authored-by: Huaxin Gao <huaxing@us.ibm.com> Signed-off-by: Huaxin Gao <huaxing@us.ibm.com>
huaxingao
commented
Jul 24, 2020
Merged to 3.0. Thank you all for reviewing! |
What changes were proposed in this pull request?
backporting the changes to 3.0
set params default values in trait Params for feature and tuning in both Scala and Python.
Why are the changes needed?
Make ML has the same default param values between estimator and its corresponding transformer, and also between Scala and Python.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Existing and modified tests