-
Notifications
You must be signed in to change notification settings - Fork 28.8k
[SPARK-4348] [SPARK-4821] Backport PySpark random.py -> rand.py fix to branch-1.1 #4011
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-4348] [SPARK-4821] Backport PySpark random.py -> rand.py fix to branch-1.1 #4011
Conversation
This PR rename random.py to rand.py to avoid the side affects of conflict with random module, but still keep the same interface as before. ``` >>> from pyspark.mllib.random import RandomRDDs ``` ``` $ pydoc pyspark.mllib.random Help on module random in pyspark.mllib: NAME random - Python package for random data generation. FILE /Users/davies/work/spark/python/pyspark/mllib/rand.py CLASSES __builtin__.object pyspark.mllib.random.RandomRDDs class RandomRDDs(__builtin__.object) | Generator methods for creating RDDs comprised of i.i.d samples from | some distribution. | | Static methods defined here: | | normalRDD(sc, size, numPartitions=None, seed=None) ``` cc mengxr reference link: http://xion.org.pl/2012/05/06/hacking-python-imports/ Author: Davies Liu <[email protected]> Closes apache#3216 from davies/random and squashes the following commits: 7ac4e8b [Davies Liu] rename random.py to rand.py (cherry picked from commit ce0333f) Signed-off-by: Josh Rosen <[email protected]> Conflicts: python/pyspark/mllib/feature.py python/run-tests
+ small doc edit + include edit to make IntelliJ happy CC: davies mengxr Note to davies -- this does not fix the "WARNING: Literal block expected; none found." warnings since that seems to involve spacing which IntelliJ does not like. (Those warnings occur when generating the Python docs.) Author: Joseph K. Bradley <[email protected]> Closes apache#3669 from jkbradley/python-warnings and squashes the following commits: 4587868 [Joseph K. Bradley] fixed warning 8cb073c [Joseph K. Bradley] Updated based on davies recommendation c51eca4 [Joseph K. Bradley] Updated rst file for pyspark.mllib.rand doc. Small doc edit. Small include edit to make IntelliJ happy. Conflicts: python/docs/pyspark.streaming.rst python/pyspark/mllib/feature.py
/cc @davies @jkbradley |
QA tests have started for PR 4011 at commit
|
LGTM, thanks! |
Yay! |
QA tests have finished for PR 4011 at commit
|
Test FAILed. |
This fixed the PySpark unit tests, but the build is still failing due to a MiMa issue (which we hadn't noticed because PySpark failures were preventing those checks from running):
Fixing this should just be a matter of backporting an exclude from another branch, since the method in question was not public (this is due to how MiMa handles public fields in I'm going to merge this now, then push a hotfix commit to address the MiMa issue. |
…o branch-1.1 This backports #3216 and #3669 to `branch-1.1` in order to fix the PySpark unit tests. Author: Joseph K. Bradley <[email protected]> Author: Davies Liu <[email protected]> Closes #4011 from JoshRosen/pyspark-rand-fix-1.1-backport and squashes the following commits: ace4cb6 [Joseph K. Bradley] [SPARK-4821] [mllib] [python] [docs] Fix for pyspark.mllib.rand doc 7ae5a1c [Davies Liu] [SPARK-4348] [PySpark] [MLlib] rename random.py to rand.py
This backports #3216 and #3669 to
branch-1.1
in order to fix the PySpark unit tests.