-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-8032] [PySpark] Make version checking for NumPy in MLlib more robust #6579
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
Conversation
ping @mengxr @jkbradley |
Test build #33968 has finished for PR 6579 at commit
|
aae1a2e
to
3a3a639
Compare
Test build #33986 has finished for PR 6579 at commit
|
Test build #33989 has finished for PR 6579 at commit
|
jenkins test this please |
@@ -23,7 +23,14 @@ | |||
# MLlib currently needs NumPy 1.4+, so complain if lower | |||
|
|||
import numpy | |||
if numpy.version.version < '1.4': | |||
ver = numpy.version.version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this before the official 1.10 release comes out! The following may be simpler:
ver = [int(x) for x in numpy.version.version.split(.)[:2]]
if ver < [1, 4]:
raise ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this way of list comparison common? Funny, I haven't used it before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the last section in https://docs.python.org/2/tutorial/datastructures.html
Test build #33992 has finished for PR 6579 at commit
|
done |
Test build #34003 has finished for PR 6579 at commit
|
@MechCoder Why it is |
I see, I misunderstood the comment '"MLlib requires NumPy 1.4+" |
@MechCoder please test it on your local and then watch the Jenkins error message. Do not ignore Jenkins because there are flaky tests. Some Jenkins failures are real. For example, In https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/34003/consoleFull, you can see
|
lol. sorry about the silly mistake. |
Test build #34004 has finished for PR 6579 at commit
|
Test build #34011 has finished for PR 6579 at commit
|
Test build #34014 has finished for PR 6579 at commit
|
…robust The current checking does version `1.x' is less than `1.4' this will fail if x has greater than 1 digit, since x > 4, however `1.x` < `1.4` It fails in my system since I have version `1.10` :P Author: MechCoder <manojkumarsivaraj334@gmail.com> Closes #6579 from MechCoder/np_ver and squashes the following commits: 15430f8 [MechCoder] fix syntax error 893fb7e [MechCoder] remove equal to e35f0d4 [MechCoder] minor e89376c [MechCoder] Better checking 22703dd [MechCoder] [SPARK-8032] Make version checking for NumPy in MLlib more robust (cherry picked from commit 452eb82) Signed-off-by: Xiangrui Meng <meng@databricks.com>
…robust The current checking does version `1.x' is less than `1.4' this will fail if x has greater than 1 digit, since x > 4, however `1.x` < `1.4` It fails in my system since I have version `1.10` :P Author: MechCoder <manojkumarsivaraj334@gmail.com> Closes #6579 from MechCoder/np_ver and squashes the following commits: 15430f8 [MechCoder] fix syntax error 893fb7e [MechCoder] remove equal to e35f0d4 [MechCoder] minor e89376c [MechCoder] Better checking 22703dd [MechCoder] [SPARK-8032] Make version checking for NumPy in MLlib more robust (cherry picked from commit 452eb82) Signed-off-by: Xiangrui Meng <meng@databricks.com>
…robust The current checking does version `1.x' is less than `1.4' this will fail if x has greater than 1 digit, since x > 4, however `1.x` < `1.4` It fails in my system since I have version `1.10` :P Author: MechCoder <manojkumarsivaraj334@gmail.com> Closes #6579 from MechCoder/np_ver and squashes the following commits: 15430f8 [MechCoder] fix syntax error 893fb7e [MechCoder] remove equal to e35f0d4 [MechCoder] minor e89376c [MechCoder] Better checking 22703dd [MechCoder] [SPARK-8032] Make version checking for NumPy in MLlib more robust (cherry picked from commit 452eb82) Signed-off-by: Xiangrui Meng <meng@databricks.com>
…robust The current checking does version `1.x' is less than `1.4' this will fail if x has greater than 1 digit, since x > 4, however `1.x` < `1.4` It fails in my system since I have version `1.10` :P Author: MechCoder <manojkumarsivaraj334@gmail.com> Closes #6579 from MechCoder/np_ver and squashes the following commits: 15430f8 [MechCoder] fix syntax error 893fb7e [MechCoder] remove equal to e35f0d4 [MechCoder] minor e89376c [MechCoder] Better checking 22703dd [MechCoder] [SPARK-8032] Make version checking for NumPy in MLlib more robust (cherry picked from commit 452eb82) Signed-off-by: Xiangrui Meng <meng@databricks.com>
…robust The current checking does version `1.x' is less than `1.4' this will fail if x has greater than 1 digit, since x > 4, however `1.x` < `1.4` It fails in my system since I have version `1.10` :P Author: MechCoder <manojkumarsivaraj334@gmail.com> Closes #6579 from MechCoder/np_ver and squashes the following commits: 15430f8 [MechCoder] fix syntax error 893fb7e [MechCoder] remove equal to e35f0d4 [MechCoder] minor e89376c [MechCoder] Better checking 22703dd [MechCoder] [SPARK-8032] Make version checking for NumPy in MLlib more robust (cherry picked from commit 452eb82) Signed-off-by: Xiangrui Meng <meng@databricks.com>
LGTM. Merged into master and all branches since 1.0. Thanks! |
…robust The current checking does version `1.x' is less than `1.4' this will fail if x has greater than 1 digit, since x > 4, however `1.x` < `1.4` It fails in my system since I have version `1.10` :P Author: MechCoder <manojkumarsivaraj334@gmail.com> Closes apache#6579 from MechCoder/np_ver and squashes the following commits: 15430f8 [MechCoder] fix syntax error 893fb7e [MechCoder] remove equal to e35f0d4 [MechCoder] minor e89376c [MechCoder] Better checking 22703dd [MechCoder] [SPARK-8032] Make version checking for NumPy in MLlib more robust
…robust The current checking does version `1.x' is less than `1.4' this will fail if x has greater than 1 digit, since x > 4, however `1.x` < `1.4` It fails in my system since I have version `1.10` :P Author: MechCoder <manojkumarsivaraj334@gmail.com> Closes apache#6579 from MechCoder/np_ver and squashes the following commits: 15430f8 [MechCoder] fix syntax error 893fb7e [MechCoder] remove equal to e35f0d4 [MechCoder] minor e89376c [MechCoder] Better checking 22703dd [MechCoder] [SPARK-8032] Make version checking for NumPy in MLlib more robust
The current checking does version
1.x' is less than
1.4' this will fail if x has greater than 1 digit, since x > 4, however1.x
<1.4
It fails in my system since I have version
1.10
:P