-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-37429][PYTHON][MLLIB] Inline annotations for pyspark.mllib.linalg.__init__.py #35020
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.
This is intentionally simplified compared to pyi implementation ‒ there seems to be no advantage of keeping original overloads.
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.
For some reason, mypy doesn't recognize ndarray.tostring.
|
cc @WeichenXu123 . If there are no reviews being done, I would be fine to go ahead as are. I will leave it to you @zero323 - I have less background on ML side .. |
HyukjinKwon
left a comment
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.
LGTM
|
Merged into master. |
…alg.__init__.py ### What changes were proposed in this pull request? Inline annotations for `pyspark.mllib.linalg.__init__.py` ### Why are the changes needed? Currently, there is type hint stub files `pyspark.mllib.linalg.__init__.pyi` to show the expected types for functions, but we can also take advantage of static type checking within the functions by inlining the type hints. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. Closes apache#35020 from zero323/SPARK-37429. Authored-by: zero323 <mszymkiewicz@gmail.com> Signed-off-by: zero323 <mszymkiewicz@gmail.com>
What changes were proposed in this pull request?
Inline annotations for
pyspark.mllib.linalg.__init__.pyWhy are the changes needed?
Currently, there is type hint stub files
pyspark.mllib.linalg.__init__.pyito show the expected types for functions, but we can also take advantage of static type checking within the functions by inlining the type hints.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing tests.