Uh oh!
There was an error while loading. Please reload this page.
[SPARK-23300][TESTS] Prints out if Pandas and PyArrow are installed or not in PySpark SQL tests - #20473
[SPARK-23300][TESTS] Prints out if Pandas and PyArrow are installed or not in PySpark SQL tests#20473HyukjinKwon wants to merge 2 commits into
Conversation
HyukjinKwon
commented
Feb 1, 2018
@ueshin, @cloud-fan, @yhuai, @felixcheung and @BryanCutler, I tried to log it here. Could you take a look and see if it makes sense to you? |
There was a problem hiding this comment.
Otherwise, it prints out the exception too, for example:
Will test the following Python modules: ['pyspark-sql']
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named foo
PyArrow is not installed in Python executable 'python2.7', skipping related tests in 'pyspark-sql'.
SparkQA
commented
Feb 1, 2018
Test build #86929 has finished for PR 20473 at commit
|
HyukjinKwon
commented
Feb 1, 2018
Current Jenkins output was: |
SparkQA
commented
Feb 1, 2018
Test build #86930 has finished for PR 20473 at commit
|
felixcheung
left a comment
There was a problem hiding this comment.
LGTM.
as a future enhancement, perhaps we should check for the version loaded? eg. pyarrow version
There was a problem hiding this comment.
How about we also explicitly mention that pyarrow/pandas related tests will run if they are installed?
There was a problem hiding this comment.
Actually, since we are here, is it possible to do the same thing as
spark/python/pyspark/sql/tests.py
Lines 51 to 63 in ec63e2d
spark/python/pyspark/sql/tests.py
Lines 78 to 84 in ec63e2d
It will be nice to use the same logic. Otherwise, even we do not print the warning at here, tests may still get skipped because of the version issue.
There was a problem hiding this comment.
Ah, hm. I believe we don't access to our main pyspark here. Let me check if I can address your concern today (or late tonight KST).
There was a problem hiding this comment.
#20473 (comment) is easy but I think #20473 (comment) makes things complicated.
Let me try it to show how it looks like.
There was a problem hiding this comment.
I think I can't easily reuse require_minimum_pandas_version or require_minimum_pyarrow_version since it looks it's not guaranteed to access to our main pyspark here. I tries to address the comments at my best. Also updated PR description. Please check the logs above.
ueshin
left a comment
There was a problem hiding this comment.
Thanks for working on this! I like this idea.
LGTM except for some comments.
There was a problem hiding this comment.
Let's have 0.8.0 as a variable in this file, or hopefully somewhere global if possible.
There was a problem hiding this comment.
Ah, hm .. I think I am not sure of a good place to put them as globals .. let me just make a variable here. Let me leave a comment there too.
SparkQA
commented
Feb 2, 2018
Test build #86965 has finished for PR 20473 at commit
|
HyukjinKwon
commented
Feb 2, 2018
The message seems now much clear :D. |
HyukjinKwon
commented
Feb 2, 2018
BTW @ueshin, I think we should use spark/python/pyspark/sql/tests.py Lines 78 to 84 in ec63e2d because we declared >= 0.8.0 as you already know: Line 204 in b8bfce5 Would you like me to double check other files and fix it separately or would you be willing to fix it? |
There was a problem hiding this comment.
could we grep this https://github.com/apache/spark/blob/master/python/setup.py#L204
There was a problem hiding this comment.
Not sure .. I was thinking of putting this in ./dev/sparktestsupport/modules.py too but .. I believe this should be done separately. We should replace these too:
spark/python/pyspark/sql/utils.py
Line 120 in 12d20dd
spark/python/pyspark/sql/utils.py
Line 130 in 12d20dd
SparkQA
commented
Feb 2, 2018
Test build #86972 has finished for PR 20473 at commit
|
ueshin
commented
Feb 2, 2018
@HyukjinKwon Good catch! Yeah, we should use it there. Could you fix it please? Thanks! |
HyukjinKwon
commented
Feb 2, 2018
Will double check and open a PR tonight .. |
BryanCutler
left a comment
There was a problem hiding this comment.
The print outs look great! I'm not sure if there is a better way to get the required version numbers, but this is probably good for now, thanks @HyukjinKwon!
HyukjinKwon
commented
Feb 4, 2018
retest this please |
SparkQA
commented
Feb 4, 2018
Test build #87046 has finished for PR 20473 at commit
|
| if pyspark_sql in modules_to_test: | ||
| # TODO(HyukjinKwon): Relocate and deduplicate these version specifications. | ||
| minimum_pyarrow_version = '0.8.0' | ||
| minimum_pandas_version = '0.19.2' |
There was a problem hiding this comment.
In the last commit,
I only replaced
minimal_pyarrow_version->minimum_pyarrow_versionandminimal_pandas_version->minimum_pandas_versionReplaced the comment to
# TODO(HyukjinKwon): Relocate and deduplicate these version specifications., to match it to [SPARK-23319][TESTS] Explicitly specify Pandas and PyArrow versions in PySpark tests (to skip or test) #20487.
SparkQA
commented
Feb 5, 2018
Test build #87055 has finished for PR 20473 at commit
|
SparkQA
commented
Feb 5, 2018
Test build #87056 has finished for PR 20473 at commit
|
HyukjinKwon
commented
Feb 5, 2018
Will merge this one if there's no more comments in few days. |
ueshin
commented
Feb 5, 2018
LGTM. |
HyukjinKwon
commented
Feb 6, 2018
Merged to master. |
HyukjinKwon
commented
Feb 6, 2018
Thank you @felixcheung, @yhuai, @ueshin and @BryanCutler for reviewing this. |
HyukjinKwon
commented
Feb 7, 2018
Let me actually backport this to bracnh-2.3. I think there isn't any downside or harm to backport it. |
…r not in PySpark SQL tests This PR proposes to log if PyArrow and Pandas are installed or not so we can check if related tests are going to be skipped or not. Manually tested: I don't have PyArrow installed in PyPy. ```bash $ ./run-tests --python-executables=python3 ``` ``` ... Will test against the following Python executables: ['python3'] Will test the following Python modules: ['pyspark-core', 'pyspark-ml', 'pyspark-mllib', 'pyspark-sql', 'pyspark-streaming'] Will test PyArrow related features against Python executable 'python3' in 'pyspark-sql' module. Will test Pandas related features against Python executable 'python3' in 'pyspark-sql' module. Starting test(python3): pyspark.mllib.tests Starting test(python3): pyspark.sql.tests Starting test(python3): pyspark.streaming.tests Starting test(python3): pyspark.tests ``` ```bash $ ./run-tests --modules=pyspark-streaming ``` ``` ... Will test against the following Python executables: ['python2.7', 'pypy'] Will test the following Python modules: ['pyspark-streaming'] Starting test(pypy): pyspark.streaming.tests Starting test(pypy): pyspark.streaming.util Starting test(python2.7): pyspark.streaming.tests Starting test(python2.7): pyspark.streaming.util ``` ```bash $ ./run-tests ``` ``` ... Will test against the following Python executables: ['python2.7', 'pypy'] Will test the following Python modules: ['pyspark-core', 'pyspark-ml', 'pyspark-mllib', 'pyspark-sql', 'pyspark-streaming'] Will test PyArrow related features against Python executable 'python2.7' in 'pyspark-sql' module. Will test Pandas related features against Python executable 'python2.7' in 'pyspark-sql' module. Will skip PyArrow related features against Python executable 'pypy' in 'pyspark-sql' module. PyArrow >= 0.8.0 is required; however, PyArrow was not found. Will test Pandas related features against Python executable 'pypy' in 'pyspark-sql' module. Starting test(pypy): pyspark.streaming.tests Starting test(pypy): pyspark.sql.tests Starting test(pypy): pyspark.tests Starting test(python2.7): pyspark.mllib.tests ``` ```bash $ ./run-tests --modules=pyspark-sql --python-executables=pypy ``` ``` ... Will test against the following Python executables: ['pypy'] Will test the following Python modules: ['pyspark-sql'] Will skip PyArrow related features against Python executable 'pypy' in 'pyspark-sql' module. PyArrow >= 0.8.0 is required; however, PyArrow was not found. Will test Pandas related features against Python executable 'pypy' in 'pyspark-sql' module. Starting test(pypy): pyspark.sql.tests Starting test(pypy): pyspark.sql.catalog Starting test(pypy): pyspark.sql.column Starting test(pypy): pyspark.sql.conf ``` After some modification to produce other cases: ```bash $ ./run-tests ``` ``` ... Will test against the following Python executables: ['python2.7', 'pypy'] Will test the following Python modules: ['pyspark-core', 'pyspark-ml', 'pyspark-mllib', 'pyspark-sql', 'pyspark-streaming'] Will skip PyArrow related features against Python executable 'python2.7' in 'pyspark-sql' module. PyArrow >= 20.0.0 is required; however, PyArrow 0.8.0 was found. Will skip Pandas related features against Python executable 'python2.7' in 'pyspark-sql' module. Pandas >= 20.0.0 is required; however, Pandas 0.20.2 was found. Will skip PyArrow related features against Python executable 'pypy' in 'pyspark-sql' module. PyArrow >= 20.0.0 is required; however, PyArrow was not found. Will skip Pandas related features against Python executable 'pypy' in 'pyspark-sql' module. Pandas >= 20.0.0 is required; however, Pandas 0.22.0 was found. Starting test(pypy): pyspark.sql.tests Starting test(pypy): pyspark.streaming.tests Starting test(pypy): pyspark.tests Starting test(python2.7): pyspark.mllib.tests ``` ```bash ./run-tests-with-coverage ``` ``` ... Will test against the following Python executables: ['python2.7', 'pypy'] Will test the following Python modules: ['pyspark-core', 'pyspark-ml', 'pyspark-mllib', 'pyspark-sql', 'pyspark-streaming'] Will test PyArrow related features against Python executable 'python2.7' in 'pyspark-sql' module. Will test Pandas related features against Python executable 'python2.7' in 'pyspark-sql' module. Coverage is not installed in Python executable 'pypy' but 'COVERAGE_PROCESS_START' environment variable is set, exiting. ``` Author: hyukjinkwon <gurwls223@gmail.com> Closesapache#20473 from HyukjinKwon/SPARK-23300.
What changes were proposed in this pull request?
This PR proposes to log if PyArrow and Pandas are installed or not so we can check if related tests are going to be skipped or not.
How was this patch tested?
Manually tested:
I don't have PyArrow installed in PyPy.
After some modification to produce other cases: