Skip to content

Conversation

@Louiszr
Copy link

@Louiszr Louiszr commented Aug 23, 2020

What changes were proposed in this pull request?

Why are the changes needed?

  • foldCol is from 3.1 hence causing tests to fail.
  • CrossValidatorModel.copy() is supposed to shallow copy models not lists of models.

Does this PR introduce any user-facing change?

No

How was this patch tested?

@viirya
Copy link
Member

viirya commented Aug 23, 2020

ok to test

@SparkQA
Copy link

SparkQA commented Aug 23, 2020

Test build #127812 has finished for PR 29524 at commit 17f99d4.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@Louiszr
Copy link
Author

Louiszr commented Aug 23, 2020

Ended up changing more than just foldCol.

There was a bug in #29445 where CrossValidatorModel.copy() does not correctly copy subModels. The parameter is a list of list of models. Instead of calling .copy on the models, the original implementation called .copy on the list of models.
In some Python 3 version you can call .copy on a list, it will shallow copy the list. Hence the CI in master didn't catch the bug. Whereas in branch-3.0 python2.7 test caught it.

I modified the unit tests to make sure .copy() is called on the model rather than the list. I would open a PR to master in the next few days.

@Louiszr
Copy link
Author

Louiszr commented Aug 23, 2020

cc @huaxingao

@SparkQA
Copy link

SparkQA commented Aug 23, 2020

Test build #127818 has finished for PR 29524 at commit 989650d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-32092][ML][PySpark][BRANCH-3.0] Removed foldCol related code [SPARK-32092][ML][PySpark][3.0] Removed foldCol related code Aug 23, 2020
@dongjoon-hyun
Copy link
Member

Also, cc @srowen

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK

huaxingao pushed a commit that referenced this pull request Aug 24, 2020
### What changes were proposed in this pull request?

- Removed `foldCol` related code introduced in #29445 which is causing issues in the base branch.
- Fixed `CrossValidatorModel.copy()` so that it correctly calls `.copy()` on the models instead of lists of models.

### Why are the changes needed?

- `foldCol` is from 3.1 hence causing tests to fail.
- `CrossValidatorModel.copy()` is supposed to shallow copy models not lists of models.

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

- Existing tests created in #29445 ran and passed.
- Updated `test_copy` to make sure `copy()` is called on models instead of lists of models.

Closes #29524 from Louiszr/remove-foldcol-3.0.

Authored-by: Louiszr <[email protected]>
Signed-off-by: Huaxin Gao <[email protected]>
@huaxingao
Copy link
Contributor

Merged to 3.0. Thank you all!

@huaxingao huaxingao closed this Aug 24, 2020
@Louiszr Louiszr deleted the remove-foldcol-3.0 branch August 26, 2020 21:27
@Louiszr Louiszr restored the remove-foldcol-3.0 branch August 26, 2020 21:32
huaxingao pushed a commit that referenced this pull request Aug 28, 2020
… to copy models instead of list

### What changes were proposed in this pull request?

Fixed `CrossValidatorModel.copy()` so that it correctly calls `.copy()` on the models instead of lists of models.

### Why are the changes needed?

`copy()` was first changed in #29445 . The issue was found in CI of #29524 and fixed. This PR introduces the exact same change so that `CrossValidatorModel.copy()` and its related tests are aligned in branch `master` and branch `branch-3.0`.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Updated `test_copy` to make sure `copy()` is called on models instead of lists of models.

Closes #29553 from Louiszr/fix-cv-copy.

Authored-by: Louiszr <[email protected]>
Signed-off-by: Huaxin Gao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants