[SPARK-46107][PYTHON][ML] Deprecate pyspark.keyword_only API - #44023
Closed
HyukjinKwon wants to merge 7 commits into
Closed
[SPARK-46107][PYTHON][ML] Deprecate pyspark.keyword_only API#44023HyukjinKwon wants to merge 7 commits into
HyukjinKwon wants to merge 7 commits into
Conversation
Member
Author
|
cc @mengxr @WeichenXu123 @zhengruifeng FYI |
Member
Author
|
cc @zero323 too |
HyukjinKwon
force-pushed
the
SPARK-46107
branch
from
November 27, 2023 03:31
ef356d7 to
9b1de88
Compare
HyukjinKwon
force-pushed
the
SPARK-46107
branch
from
November 27, 2023 04:47
f82bc37 to
c6b6aec
Compare
HyukjinKwon
commented
Nov 27, 2023
| weightCol: Optional[str] = None, | ||
| ) -> "GaussianMixture": | ||
| """ | ||
| setParams(self, \\*, featuresCol="features", predictionCol="prediction", k=2, \ |
HyukjinKwon
commented
Nov 27, 2023
| __init__(self, \\*, featuresCol="features", predictionCol="prediction", k=2, \ | ||
| probabilityCol="probability", tol=0.01, maxIter=100, seed=None, \ | ||
| aggregationDepth=2, weightCol=None) | ||
| """ |
Member
Author
|
Alrigjt, I don't think I can make this working without the decorator because the fact that the argument is given matters (vs default, see also cb43bbe). I am dropping this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What changes were proposed in this pull request?
This PR deprecates
pyspark.keyword_onlyAPI, remove the usage in our codebase.Note that this PR also removes the docstring that is used for substituting the signature (
autodoc_docstring_signaturefeature) in user-facing API documentation. We use keyword-only arguments after SPARK-32933 so we do not need to substitute them anymore, see also sphinx-doc/sphinx#5142.Why are the changes needed?
Initially
pyspark.keyword_onlywas added to maintain the Python compatibility between Python 2 and Python 3 (see PEP-3102). Those Python 2-style arguments were removed in SPARK-32933 so we do not need this decorator anymore.Does this PR introduce any user-facing change?
Yes, it deprecates
pyspark.keyword_only.How was this patch tested?
Manually checked the documentation build, and linter. Existing test cases should validate them.
Was this patch authored or co-authored using generative AI tooling?
No.