GitHub user HyukjinKwon opened a pull request: https://github.com/apache/spark/pull/21483
[SPARK-24454][ML][PYTHON] Imports image module in ml/__init__.py and add ImageSchema into __all__ ## What changes were proposed in this pull request? This PR attaches image APIs to ml module too to more expose this. ## How was this patch tested? Before: ```python >>> from pyspark import ml >>> ml.image Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'image' >>> ml.image.ImageSchema Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'image' ``` ```python >>> "ImageSchema" in globals() False >>> from pyspark.ml import * >>> "ImageSchema" in globals() False >>> ImageSchema Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'ImageSchema' is not defined ``` After: ```python >>> from pyspark import ml >>> ml.image <module 'pyspark.ml.image' from '/.../spark/python/pyspark/ml/image.pyc'> >>> ml.image.ImageSchema <pyspark.ml.image._ImageSchema object at 0x1066adf10> ``` ```python >>> "ImageSchema" in globals() False >>> from pyspark.ml import * >>> "ImageSchema" in globals() True >>> ImageSchema <pyspark.ml.image._ImageSchema object at 0x101e86f10> ``` You can merge this pull request into a Git repository by running: $ git pull https://github.com/HyukjinKwon/spark SPARK-24454 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/21483.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #21483 ---- commit 4b0be58db843609c2f7fece7becb5187b9086155 Author: hyukjinkwon <gurwls223@...> Date: 2018-06-02T04:07:20Z Imports image module in ml/__init__.py and add ImageSchema into __all__ ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org