-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-11602] [MLlib] Refine visibility for 1.6 scala API audit #9939
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually a lot of Params in ml.feature is not private, even with setter and getter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They should be public. Users should be able to reference them in order to do things like create a ParamMap, or print the built-in Param doc.
Test build #46610 has finished for PR 9939 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yu-iskw Can you confirm if you meant this to be public? It may not be necessary since most users will just call predict, computeCost, etc. What do you think? It does expose a much larger API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. It's not public parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem; thanks for confirming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realized we no longer need the Since tag, but it's not a big deal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to hide root
, we should also hide class ClusteringTreeNode
entirely because it is not used anywhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I'll keep ClusteringTreeNode private for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If ClusteringTreeNode should be public, how about the fields index, size, cost and children?
Made a second pass. This should be all for visibility review from me. |
Test build #46773 has finished for PR 9939 at commit
|
My apologies! I lost track of this PR, but will check again now. Could you please resolve the merge conflicts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may break Java compatibility (setters in traits don't seem to work). I'd revert the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted
Done with pass |
Test build #2188 has finished for PR 9939 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized this constructor should be private since the argument is private. As long as you're updating this, could you please eliminate the now-unnecessary Since annotations here?
Test build #47468 has finished for PR 9939 at commit
|
LGTM. I'll merge this with master and branch-1.6 |
jira: https://issues.apache.org/jira/browse/SPARK-11602 Made a pass on the API change of 1.6. Open the PR for efficient discussion. Author: Yuhao Yang <[email protected]> Closes #9939 from hhbyyh/auditScala. (cherry picked from commit 9fba9c8) Signed-off-by: Joseph K. Bradley <[email protected]>
jira: https://issues.apache.org/jira/browse/SPARK-11602
Made a pass on the API change of 1.6. Open the PR for efficient discussion.