-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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-10273] Add @since annotation to pyspark.mllib.feature #8633
[SPARK-10273] Add @since annotation to pyspark.mllib.feature #8633
Conversation
@@ -51,6 +51,26 @@ | |||
# for back compatibility | |||
from pyspark.sql import SQLContext, HiveContext, SchemaRDD, Row | |||
|
|||
|
|||
def since(version): |
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 should belong to SPARK-10373. We should have a separate PR for it and then update this PR. ping @davies
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.
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.
OK - no problem - I'll update this (+ SPARK-10269/10271/10272) once SPARK-10373 is complete.
add to whitelist |
Test build #42151 has finished for PR 8633 at commit
|
Test build #42214 has finished for PR 8633 at commit
|
557aaac
to
e6a4c47
Compare
@@ -84,11 +84,14 @@ class Normalizer(VectorTransformer): | |||
>>> nor2 = Normalizer(float("inf")) | |||
>>> nor2.transform(v) | |||
DenseVector([0.0, 0.5, 1.0]) | |||
|
|||
.. versionadded:: 1.2.0 |
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.
Since we won't introduce new API in the micro releases, I think it's better to use 1.2
for short. cc @mengxr
Also we could just use float number as version, see pyspark/sql as examples.
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 think matching the overall project versioning scheme make it's clearer - but I'm happy to implement it either way.
One thing to watch for with using floats is that you can't differentiate between 1.1 and 1.10 (but it looks like that's unlikely to be a problem from the versioning history).
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 1.10
or 1.1.1
, we still need to use string. This change is not necessary, just one minor comment.
Test build #42215 has finished for PR 8633 at commit
|
Test build #42292 has finished for PR 8633 at commit
|
@noel-smith @yu-iskw Could you help review each other's PRs on I want to merge them as soon as possible to avoid future merge conflicts. It would be nice if we can distribute the work. Please give |
Test build #42443 has finished for PR 8633 at commit
|
LGTM. Merged into master. Thanks! |
Duplicated the @SInCE decorator from pyspark.sql into pyspark (also tweaked to handle functions without docstrings).
Added @SInCE to methods + "versionadded::" to classes (derived from the git file history in pyspark).