Skip to content
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

[PySpark] Fix tests with Python 2.6 in 1.0 branch #3668

Closed
wants to merge 4 commits into from

Conversation

davies
Copy link
Contributor

@davies davies commented Dec 10, 2014

[SPARK-2951] [PySpark] support unpickle array.array for Python 2.6

Pyrolite can not unpickle array.array which pickled by Python 2.6, this patch fix it by extend Pyrolite.

There is a bug in Pyrolite when unpickle array of float/double, this patch workaround it by reverse the endianness for float/double. This workaround should be removed after Pyrolite have a new release to fix this issue.

[PySpark] [SPARK-2954] [SPARK-2948] [SPARK-2910] [SPARK-2101] Python 2.6 Fixes

- Modify python/run-tests to test with Python 2.6
- Use unittest2 when running on Python 2.6.
- Fix issue with namedtuple.
- Skip TestOutputFormat.test_newhadoop on Python 2.6 until SPARK-2951 is fixed.
- Fix MLlib _deserialize_double on Python 2.6.

[SPARK-3867][PySpark] ./python/run-tests failed when it run with Python 2.6 and unittest2 is not installed
./python/run-tests search a Python 2.6 executable on PATH and use it if available.
When using Python 2.6, it is going to import unittest2 module which is not a standard library in Python 2.6, so it fails with Import

Pyrolite can not unpickle array.array which pickled by Python 2.6, this patch fix it by extend Pyrolite.

There is a bug in Pyrolite when unpickle array of float/double, this patch workaround it by reverse the endianness for float/double. This workaround should be removed after Pyrolite have a new release to fix this issue.

I had send an PR to Pyrolite to fix it:  irmen/Pyrolite#11

Author: Davies Liu <[email protected]>

Closes apache#2365 from davies/pickle and squashes the following commits:

f44f771 [Davies Liu] enable tests about array
3908f5c [Davies Liu] Merge branch 'master' into pickle
c77c87b [Davies Liu] cleanup debugging code
60e4e2f [Davies Liu] support unpickle array.array for Python 2.6

Conflicts:
	core/src/main/scala/org/apache/spark/api/python/SerDeUtil.scala
	python/pyspark/tests.py
@SparkQA
Copy link

SparkQA commented Dec 10, 2014

Test build #24318 has started for PR 3668 at commit 7c55cff.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 10, 2014

Test build #24318 has finished for PR 3668 at commit 7c55cff.

  • This patch fails some tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24318/
Test FAILed.

@JoshRosen
Copy link
Contributor

Looks like we also need to backport #1874 so that the tests can work on Python 2.6?

@andrewor14
Copy link
Contributor

@davies would you mind squeezing all of that into this PR so we can fix the build once and for all?

JoshRosen and others added 2 commits December 10, 2014 14:30
…2.6 Fixes

- Modify python/run-tests to test with Python 2.6
- Use unittest2 when running on Python 2.6.
- Fix issue with namedtuple.
- Skip TestOutputFormat.test_newhadoop on Python 2.6 until SPARK-2951 is fixed.
- Fix MLlib _deserialize_double on Python 2.6.

Closes apache#1868.  Closes apache#1042.

Author: Josh Rosen <[email protected]>

Closes apache#1874 from JoshRosen/python2.6 and squashes the following commits:

983d259 [Josh Rosen] [SPARK-2954] Fix MLlib _deserialize_double on Python 2.6.
5d18fd7 [Josh Rosen] [SPARK-2948] [SPARK-2910] [SPARK-2101] Python 2.6 fixes

Conflicts:
	python/pyspark/mllib/_common.py
	python/pyspark/serializers.py
	python/pyspark/tests.py
…on 2.6 and unittest2 is not installed

./python/run-tests search a Python 2.6 executable on PATH and use it if available.
When using Python 2.6, it is going to import unittest2 module which is not a standard library in Python 2.6, so it fails with ImportError.

Author: cocoatomo <[email protected]>

Closes apache#2759 from cocoatomo/issues/3867-unittest2-import-error and squashes the following commits:

f068eb5 [cocoatomo] [SPARK-3867] ./python/run-tests failed when it run with Python 2.6 and unittest2 is not installed
@davies davies changed the title [SPARK-2951] [PySpark] support unpickle array.array for Python 2.6 (port to 1.0) [PySpark] Fix tests with Python 2.6 in 1.0 branch Dec 10, 2014
@SparkQA
Copy link

SparkQA commented Dec 10, 2014

Test build #24324 has started for PR 3668 at commit 14ad3d9.

  • This patch merges cleanly.

@davies
Copy link
Contributor Author

davies commented Dec 10, 2014

@andrewor14 I had added those two commits.

@SparkQA
Copy link

SparkQA commented Dec 10, 2014

Test build #24326 has started for PR 3668 at commit bda1c72.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 10, 2014

Test build #24324 has finished for PR 3668 at commit 14ad3d9.

  • This patch fails some tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24324/
Test FAILed.

@SparkQA
Copy link

SparkQA commented Dec 10, 2014

Test build #24326 has finished for PR 3668 at commit bda1c72.

  • This patch fails some tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24326/
Test FAILed.

@SparkQA
Copy link

SparkQA commented Dec 11, 2014

Test build #24337 has started for PR 3668 at commit b32583d.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 11, 2014

Test build #24337 has finished for PR 3668 at commit b32583d.

  • This patch fails some tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24337/
Test FAILed.

@davies
Copy link
Contributor Author

davies commented Dec 11, 2014

@andrewor14 The failed test may be related to the version of NumPy, I can not reproduce it with 1.8.1

@andrewor14
Copy link
Contributor

Yeah branch 0.9 is also having the same problem. I haven't looked deep into the issue yet but maybe @shaneknapp has a better idea?

@shaneknapp
Copy link
Contributor

would you guys be adverse to me upping the numpy version on the workers? currently, we're running numpy-1.4.1-9.el6.x86_64, which is ancient compared to the L&G release (1.9.1).

anyone know of any backwards-compatibility issues offhand? in the meanwhile, i will set up one of our staging nodes and start testing.

i'd rather not to a system-wide update during a release cycle if at all possible... but if i have to do this, i will bring up some new jenkins workers (which i was going to do during tomorrow morning's maintanence anyways) w/an updated numpy specifically for these builds.

EDIT: just looked at the spark docs and it looks like i'll indeed have to update numpy. :)

@andrewor14
Copy link
Contributor

Yeah I think the case is that in branch 0.9 we still require numpy 1.7 but later branches require only 1.4. For branch-1.0, however, it fails with some other error that I would assume is because we need a more recent version of numpy that is explicitly required.

I think we should just upgrade it, since not super likely that we'll be pushing more commits into the current RC.

@shaneknapp
Copy link
Contributor

ok, sgtm. since we're not blocking the release, i'll just get everything staged and do the upgrade during the scheduled maintenance tomorrow morning.

@andrewor14
Copy link
Contributor

Great thanks Shane.

@JoshRosen
Copy link
Contributor

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Dec 12, 2014

Test build #24412 has started for PR 3668 at commit b32583d.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 12, 2014

Test build #24412 has finished for PR 3668 at commit b32583d.

  • This patch fails some tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24412/
Test FAILed.

@JoshRosen
Copy link
Contributor

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Dec 12, 2014

Test build #24414 has started for PR 3668 at commit b32583d.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 12, 2014

Test build #24414 has finished for PR 3668 at commit b32583d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24414/
Test PASSed.

@shaneknapp
Copy link
Contributor

woot! :)

On Fri, Dec 12, 2014 at 12:47 PM, UCB AMPLab [email protected]
wrote:

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24414/
Test PASSed.


Reply to this email directly or view it on GitHub
#3668 (comment).

@andrewor14
Copy link
Contributor

Nice! I'm merging this.

asfgit pushed a commit that referenced this pull request Dec 13, 2014
[SPARK-2951] [PySpark] support unpickle array.array for Python 2.6

Pyrolite can not unpickle array.array which pickled by Python 2.6, this patch fix it by extend Pyrolite.

There is a bug in Pyrolite when unpickle array of float/double, this patch workaround it by reverse the endianness for float/double. This workaround should be removed after Pyrolite have a new release to fix this issue.

[PySpark] [SPARK-2954] [SPARK-2948] [SPARK-2910] [SPARK-2101] Python 2.6 Fixes

    - Modify python/run-tests to test with Python 2.6
    - Use unittest2 when running on Python 2.6.
    - Fix issue with namedtuple.
    - Skip TestOutputFormat.test_newhadoop on Python 2.6 until SPARK-2951 is fixed.
    - Fix MLlib _deserialize_double on Python 2.6.

[SPARK-3867][PySpark] ./python/run-tests failed when it run with Python 2.6 and unittest2 is not installed
    ./python/run-tests search a Python 2.6 executable on PATH and use it if available.
    When using Python 2.6, it is going to import unittest2 module which is not a standard library in Python 2.6, so it fails with Import

Author: cocoatomo <[email protected]>
Author: Josh Rosen <[email protected]>
Author: Davies Liu <[email protected]>
Author: Davies Liu <[email protected]>

Closes #3668 from davies/port_2365 and squashes the following commits:

b32583d [Davies Liu] rollback _common.py
bda1c72 [cocoatomo] [SPARK-3867][PySpark] ./python/run-tests failed when it run with Python 2.6 and unittest2 is not installed
14ad3d9 [Josh Rosen] [PySpark] [SPARK-2954] [SPARK-2948] [SPARK-2910] [SPARK-2101] Python 2.6 Fixes
7c55cff [Davies Liu] [SPARK-2951] [PySpark] support unpickle array.array for Python 2.6
@JoshRosen
Copy link
Contributor

Do you mind closing this PR since Andrew has merged it into branch-1.0 (9c21316)? GitHub can't auto-close it since it's not against the master branch.

@davies davies closed this Dec 16, 2014
davies pushed a commit to davies/spark that referenced this pull request Jan 9, 2015
[SPARK-2951] [PySpark] support unpickle array.array for Python 2.6

Pyrolite can not unpickle array.array which pickled by Python 2.6, this patch fix it by extend Pyrolite.

There is a bug in Pyrolite when unpickle array of float/double, this patch workaround it by reverse the endianness for float/double. This workaround should be removed after Pyrolite have a new release to fix this issue.

[PySpark] [SPARK-2954] [SPARK-2948] [SPARK-2910] [SPARK-2101] Python 2.6 Fixes

    - Modify python/run-tests to test with Python 2.6
    - Use unittest2 when running on Python 2.6.
    - Fix issue with namedtuple.
    - Skip TestOutputFormat.test_newhadoop on Python 2.6 until SPARK-2951 is fixed.
    - Fix MLlib _deserialize_double on Python 2.6.

[SPARK-3867][PySpark] ./python/run-tests failed when it run with Python 2.6 and unittest2 is not installed
    ./python/run-tests search a Python 2.6 executable on PATH and use it if available.
    When using Python 2.6, it is going to import unittest2 module which is not a standard library in Python 2.6, so it fails with Import

Author: cocoatomo <[email protected]>
Author: Josh Rosen <[email protected]>
Author: Davies Liu <[email protected]>
Author: Davies Liu <[email protected]>

Closes apache#3668 from davies/port_2365 and squashes the following commits:

b32583d [Davies Liu] rollback _common.py
bda1c72 [cocoatomo] [SPARK-3867][PySpark] ./python/run-tests failed when it run with Python 2.6 and unittest2 is not installed
14ad3d9 [Josh Rosen] [PySpark] [SPARK-2954] [SPARK-2948] [SPARK-2910] [SPARK-2101] Python 2.6 Fixes
7c55cff [Davies Liu] [SPARK-2951] [PySpark] support unpickle array.array for Python 2.6

Conflicts:
	python/pyspark/mllib/tests.py
	python/pyspark/tests.py
	python/run-tests
asfgit pushed a commit that referenced this pull request Jan 9, 2015
[PySpark] [SPARK-2954] [SPARK-2948] [SPARK-2910] [SPARK-2101] Python 2.6 Fixes

    - Modify python/run-tests to test with Python 2.6
    - Use unittest2 when running on Python 2.6.

Author: Josh Rosen <joshrosenapache.org>

Closes #3668 from davies/port_2365 and squashes the following commits:

Author: cocoatomo <[email protected]>

Closes #3968 from davies/fix_python_tests and squashes the following commits:

ac4a353 [cocoatomo] [PySpark] Fix tests with Python 2.6 in 1.0 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants