Skip to content
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

[SPARK-30493][PYTHON][ML] Remove OneVsRestModel setClassifier, setLabelCol and setWeightCol methods #27181

Closed
wants to merge 3 commits into from

Conversation

zero323
Copy link
Member

@zero323 zero323 commented Jan 12, 2020

What changes were proposed in this pull request?

Removal of OneVsRestModel.setClassifier, OneVsRestModel.setLabelCol and OneVsRestModel.setWeightCol methods.

Why are the changes needed?

Aforementioned methods shouldn't by included by SPARK-29093, as they're not present in Scala OneVsRestModel and have no practical application.

Does this PR introduce any user-facing change?

Not beyond scope of SPARK-29093].

How was this patch tested?

Existing tests.

CC @huaxingao @zhengruifeng

@SparkQA
Copy link

SparkQA commented Jan 12, 2020

Test build #116574 has finished for PR 27181 at commit 180a592.

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

@zero323 zero323 changed the title [SPARK-30493][PYTHON][ML] Remove OneVsRestModel.setClassifier [SPARK-30493][PYTHON][ML] Remove OneVsRestModel setClassifier, setLabelCol and setWeightCol methods Jan 12, 2020
@SparkQA
Copy link

SparkQA commented Jan 13, 2020

Test build #116576 has finished for PR 27181 at commit a727e3f.

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

@huaxingao
Copy link
Contributor

setLabelCol is still required. The other two should be removed.
Thanks for catching the problem!

@zero323
Copy link
Member Author

zero323 commented Jan 13, 2020

setLabelCol is still required.

Is it really? Doesn't seem like Scala counterpart has one. And ignoring that ‒ when would a Model use it?

@huaxingao
Copy link
Contributor

setLabelCol is called in OneVsRestModel._from_java

@SparkQA
Copy link

SparkQA commented Jan 13, 2020

Test build #116579 has finished for PR 27181 at commit a727e3f.

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

@huaxingao
Copy link
Contributor

actually, should use _set instead of setLabelCol in OneVsRestModel._from_java.

@zero323
Copy link
Member Author

zero323 commented Jan 13, 2020

Shouldn't weightCol be set as well?

@huaxingao
Copy link
Contributor

Yes, I think weightCol should be set as well for OneVsRestModel._from_java/_to_java and OneVsRest._from_java/_to_java

@SparkQA
Copy link

SparkQA commented Jan 13, 2020

Test build #116581 has finished for PR 27181 at commit 82367a3.

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

@HyukjinKwon
Copy link
Member

@zero323, please keep and follow the PR template - https://github.com/apache/spark/blob/master/.github/PULL_REQUEST_TEMPLATE

@zhengruifeng
Copy link
Contributor

looks reasonably straightforward
@huaxingao Seem we do not need those setter in OVRModel?

@huaxingao
Copy link
Contributor

@zhengruifeng Yes. These setters can be removed. The internal methods can use _set to set classifier, labelCol and weightCol

@HyukjinKwon
Copy link
Member

Before merging it, can we update PR description properly please? It's best to avoid having bad PR examples.

@zero323 zero323 requested a review from zhengruifeng January 13, 2020 10:58
@zhengruifeng
Copy link
Contributor

Merged to master, thanks all!

@zero323
Copy link
Member Author

zero323 commented Jan 13, 2020

@zero323, please keep and follow the PR template - https://github.com/apache/spark/blob/master/.github/PULL_REQUEST_TEMPLATE

Sorry @HyukjinKwon, it felt more like a follow-up / cleanup, than a full proposal.

@zero323
Copy link
Member Author

zero323 commented Jan 13, 2020

Yes, I think weightCol should be set as well for OneVsRestModel._from_java/_to_java and OneVsRest._from_java/_to_java

FYI I've opened SPARK-30504.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants