Uh oh!
There was an error while loading. Please reload this page.
SPARK-11295 Add packages to JUnit output for Python tests - #9263
Conversation
JoshRosen
commented
Oct 24, 2015
Jenkins, this is ok to test. |
SparkQA
commented
Oct 24, 2015
Test build #44299 has finished for PR 9263 at commit
|
SparkQA
commented
Oct 24, 2015
Test build #44300 has finished for PR 9263 at commit
|
gliptak
commented
Oct 24, 2015
pyspark.tests shows up https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44300/testReport/ I will work the others. |
SparkQA
commented
Oct 24, 2015
Test build #44302 has finished for PR 9263 at commit
|
gliptak
commented
Oct 24, 2015
The test errors with: |
SparkQA
commented
Oct 25, 2015
Test build #44310 has finished for PR 9263 at commit
|
There was a problem hiding this comment.
@mengxr This was my (failing) attempt to correct the test errors (caused by --parallelism=4?). Maybe @JoshRosen could comment?
There was a problem hiding this comment.
Yeah, you shouldn't set this. The parallelism in dev/run-tests will actually launch separate JVMs, so that's not the cause of this problem. In general, you should never set spark.driver.allowMultipleContexts (it was only added as an escape-hatch backwards-compatibility option for a feature that we never properly supported).
There must be some other problem in the tests, likely due to test cleanup or SparkContext teardown not being executed properly.
There was a problem hiding this comment.
Reviewing the tests.py-s
https://github.com/apache/spark/blob/master/python/pyspark/streaming/tests.py
initiates SparkContext differently:
@classmethod
def setUpClass(cls):
class_name = cls.__name__
conf = SparkConf().set("spark.default.parallelism", 1)
cls.sc = SparkContext(appName=class_name, conf=conf)
cls.sc.setCheckpointDir("/tmp")
@classmethod
def tearDownClass(cls):
cls.sc.stop()
# Clean up in the JVM just in case there has been some issues in Python API
try:
jSparkContextOption = SparkContext._jvm.SparkContext.get()
if jSparkContextOption.nonEmpty():
jSparkContextOption.get().stop()
except:
pass
Could this approach be retrofitted into https://github.com/apache/spark/blob/master/python/pyspark/mllib/tests.py to allow for concurrency?
SparkQA
commented
Oct 28, 2015
Test build #44478 has finished for PR 9263 at commit
|
gliptak
commented
Oct 28, 2015
This last run had a different failure than the previous run with the same code ... |
gliptak
commented
Nov 3, 2015
@JoshRosen Would you have some pointers on how to move this forward? Thanks |
mengxr
commented
Nov 6, 2015
test this please |
mengxr
commented
Nov 6, 2015
add to whitelist |
SparkQA
commented
Nov 6, 2015
Test build #45227 has finished for PR 9263 at commit
|
mengxr
commented
Nov 6, 2015
@gliptak I think this is the cause: https://github.com/apache/spark/blob/master/python/pyspark/mllib/tests.py#L79. We didn't initialize SparkContext in |
gliptak
commented
Nov 7, 2015
@mengxr Thank you for the pointer. This worked locally with |
gliptak
commented
Nov 8, 2015
@mengxr Could you trigger a build? |
SparkQA
commented
Nov 8, 2015
Test build #45309 has finished for PR 9263 at commit
|
SparkQA
commented
Nov 9, 2015
Test build #45325 has finished for PR 9263 at commit
|
gliptak
commented
Nov 9, 2015
Failure for only one of the Pythons version? The unit tests page shows no errors: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45325/testReport/ |
gliptak
commented
Nov 10, 2015
Are JUnit test results separated based on Java version running under? |
gliptak
commented
Nov 12, 2015
gliptak
commented
Nov 14, 2015
Rebased to current master |
SparkQA
commented
Nov 14, 2015
Test build #45936 has finished for PR 9263 at commit
|
gliptak
commented
Nov 14, 2015
Unit test timed out? |
zsxwing
commented
Dec 11, 2015
retest this please |
SparkQA
commented
Dec 11, 2015
Test build #47554 has finished for PR 9263 at commit
|
gliptak
commented
Dec 14, 2015
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47554/testReport/ shows 0 failures ... |
gliptak
commented
Dec 20, 2015
@zsxwing Are there some changes you would like to see to this pull request? |
JoshRosen
commented
Jan 13, 2016
Hey, sorry for forgetting about this. I'm going to trigger a retest now and will take a look at the test results. @gliptak, could you please update the PR description to say something other than "WIP", since the PR description will become the commit message? Feel free to copy description from JIRA if you'd like. I'd also be nice to add a sentence or two summarizing the changes that you needed to make to get this to work. |
JoshRosen
commented
Jan 13, 2016
Jenkins, retest this please. |
gliptak
commented
Jan 13, 2016
@JoshRosen Please let me know if you would like to see other description changes. |
SparkQA
commented
Jan 13, 2016
Test build #49329 has finished for PR 9263 at commit
|
There was a problem hiding this comment.
I can see why sc needs to be created on a per-test-case basis, but is it possible to leave ser as-is and keep it here?
There was a problem hiding this comment.
I ask because it looks like this change conflicted with a recently-modified test, causing the test to break:
======================================================================ERROR [7.323s]: test_als_ratings_id_long_error (pyspark.mllib.tests.ALSTests)
----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"/home/jenkins/workspace/SparkPullRequestBuilder/python/pyspark/mllib/tests.py", line1571, intest_als_ratings_id_long_errorself.assertRaises(Py4JJavaError, self.sc._jvm.SerDe.loads, bytearray(ser.dumps(r)))
NameError: globalname'ser'isnotdefined======================================================================ERROR [0.779s]: test_als_ratings_serialize (pyspark.mllib.tests.ALSTests)
----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"/home/jenkins/workspace/SparkPullRequestBuilder/python/pyspark/mllib/tests.py", line1562, intest_als_ratings_serializejr=self.sc._jvm.SerDe.loads(bytearray(ser.dumps(r)))
NameError: globalname'ser'isnotdefinedThere was a problem hiding this comment.
I recall seeing some concurrency issues with ser too (it has been a while). I'm pushing up a rebase/update.
There was a problem hiding this comment.
What do you mean by concurrency errors? AFAIK we run tests serially in these files.
There was a problem hiding this comment.
Maybe I was running with parallel flag locally. It has been a while ...
There was a problem hiding this comment.
@JoshRosen From the log the tests are running parallel=4.
/home/jenkins/workspace/SparkPullRequestBuilder@2/python/run-tests --modules=pyspark-core,pyspark-sql,pyspark-streaming,pyspark-mllib,pyspark-ml --parallelism=4 I will roll back the ser changes in a few.
JoshRosen
commented
Jan 13, 2016
By the way, aside from the For other reviewers: this change makes the test output much nicer in Jenkins (and thus nicer on https://spark-tests.appspot.com): One interesting thing: Jenkins seems to fail when trying to show package-level test information for the PySpark tests: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49329/testReport/pyspark.tests/. I wonder whether this could be related to the presence of multiple XML reports from concurrent PySpark test runs with different Python versions. |
gliptak
commented
Jan 13, 2016
Yes, the multiple reports might play into it. I have no visibility into Jenkins to assess further. |
SparkQA
commented
Jan 14, 2016
Test build #49349 has finished for PR 9263 at commit
|
SparkQA
commented
Jan 14, 2016
Test build #49357 has finished for PR 9263 at commit
|
gliptak
commented
Jan 14, 2016
|
gliptak
commented
Jan 14, 2016
@JoshRosen Would you like to see some other changes? |
JoshRosen
commented
Jan 14, 2016
I'd like to see what happens if you roll back that |
mengxr
commented
Jan 15, 2016
@gliptak@JoshRosen I think we shouldn't block this feature because of some failed MLlib unit tests. Feel free to disable the tests in this PR and create JIRAs under components "MLlib" and "PySpark" to track them. We could fix them in a follow-up PR. |
JoshRosen
commented
Jan 15, 2016
I still maintain that we should roll back the |
SparkQA
commented
Jan 16, 2016
Test build #49531 has finished for PR 9263 at commit
|
mengxr
commented
Jan 19, 2016
LGTM. Merged into master. Thanks for making this work! Btw, @gliptak please do not squash your commits into one when you push new changes. It is easier to see what you changed if you keep the old commits unmodified. Thanks! |
gliptak
commented
Jan 19, 2016
@mengxr I will keep that in mind. Do you usually squash commits before committing to master? Thanks |
JoshRosen
commented
Jan 19, 2016
@gliptak, our merge script automatically squashes at commit time, so there's no need for you to do it yourself. |
gliptak
commented
Jan 19, 2016
@JoshRosen I see. Thanks |
mengxr
commented
Jan 20, 2016
@gliptak I reverted the change because 0ddba6d was merged before this one and it didn't use Btw, this line needs a patch: 0ddba6d#diff-ce16909e38fc8bee429dc638b2b2dde2R426. |
SPARK-11295 Add packages to JUnit output for Python tests This improves grouping/display of test case results. Author: Gábor Lipták <gliptak@gmail.com> Closesapache#9263 from gliptak/SPARK-11295.
mengxr
commented
Jan 20, 2016
I made a new PR with fix: #10850 |
This is #9263 from gliptak (improving grouping/display of test case results) with a small fix of bisecting k-means unit test. Author: Gábor Lipták <gliptak@gmail.com> Author: Xiangrui Meng <meng@databricks.com> Closes#10850 from mengxr/SPARK-11295.
gliptak
commented
Jan 20, 2016
@mengxr Thank you (I didn't get to this last night) |

SPARK-11295 Add packages to JUnit output for Python tests
This improves grouping/display of test case results.