Skip to content

BLD add a mac run on Travis #12824

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

Merged
merged 20 commits into from
Dec 20, 2018
Merged

BLD add a mac run on Travis #12824

merged 20 commits into from
Dec 20, 2018

Conversation

jnothman
Copy link
Member

@jnothman jnothman commented Dec 19, 2018

Fixes #12658

@jnothman
Copy link
Member Author

This isn't working quickly. Strangely getting 403 just doing a basic Python run on Travis.

We should probably be using https://github.com/matthew-brett/multibuild.git

@qinhanmin2014
Copy link
Member

qinhanmin2014 commented Dec 19, 2018

We're unable to detect it :) The kmeans mac failure is due to #12648

@qinhanmin2014
Copy link
Member

@jnothman We're able to reproduce the error if we only update scipy from 0.17.0 to 1.1.0, so seems that it's indeed a scipy issue.

@jnothman
Copy link
Member Author

@jnothman We're able to reproduce the error if we only update scipy from 0.17.0 to 1.1.0, so seems that it's indeed a scipy issue.

Thanks for checking that while I was out for lunch

@jnothman
Copy link
Member Author

Now, do we disable the fit_predict tests and add this to our regular CI?

@qinhanmin2014
Copy link
Member

Now, do we disable the fit_predict tests and add this to our regular CI?

merge #12648 to keep consistent with 0.20.X branch? I think we need this if we want to add mac CI.

@qinhanmin2014
Copy link
Member

kmeans tests pass, seems that we don't need #12648 :)

@jnothman
Copy link
Member Author

jnothman commented Dec 19, 2018 via email

@rth
Copy link
Member

rth commented Dec 19, 2018

DictionaryLearning docstring fails due to a different sign in the second row of output now.


make_conda() {
TO_INSTALL="$@"
# Deactivate the travis-provided virtual environment and setup a
# conda-based environment instead
deactivate
deactivate || :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this mean?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently : is like pass. deactivate isn't applicable if we are in language: generic

@ogrisel
Copy link
Member

ogrisel commented Dec 19, 2018

So somehow they pass with latest scipy??

scipy 1.2.0 wheels seems to include openblas. scipy 1.1.0 do not (I checked the contents of the .dylibs folder of the wheel archive with unzip). Therefore scipy 1.1.0 would use the macOS accelerate system BLAS which might be the source of this non-deterministic behavior although that seems weird.

@jeremiedbb any opinion?

@ogrisel
Copy link
Member

ogrisel commented Dec 19, 2018

scipy 1.2.0 wheels seems to include openblas. scipy 1.1.0 do not (I checked the contents of the .dylibs folder of the wheel archive with unzip). Therefore scipy 1.1.0 would use the macOS accelerate system BLAS which might be the source of this non-deterministic behavior although that seems weird.

Actually, travis uses anaconda on the macOS build so this is unrelated. However the version of the travis build with the PCA test that fails runs openblas 0.2.20 while the latest build that does not have this failure uses openblas 0.3.3 so it might indeed be a numerical precision issue in old versions of openblas.

@jeremiedbb
Copy link
Member

My first though was that the test was unstable due to the way inertia is computed, which can lead to different inertia for only a permutation of the labels. But I tried with many seeds and the test seems stable.

I Also tried with OpenBLAS 0.2.20 and OpenBLAS 0.3.3 and it's stable with both, so I does not seem to be blas instabilities either...

@ogrisel
Copy link
Member

ogrisel commented Dec 19, 2018

DictionaryLearning docstring fails due to a different sign in the second row of output now.

The DictionaryLearning doctest was reverted in master. I merged master into this branch to check whether CI can pass now.

@qinhanmin2014
Copy link
Member

Is it possible to remove the 3rd Travis job?
Maybe it's better to put the mac job at the end.

Also:

- update comment to make it explicit when we test with OpenBLAS;
- remove redundant Python 3.5 linux build.
@ogrisel
Copy link
Member

ogrisel commented Dec 19, 2018

@qinhanmin2014 I pushed a new commit with your suggestions. Also I think it's better to test the anaconda mac setup with MKL as most anaconda users on mac will probably use MKL.

@ogrisel
Copy link
Member

ogrisel commented Dec 19, 2018

I have no idea why the previous mac build is marked failed by travis:

https://travis-ci.org/scikit-learn/scikit-learn/jobs/469979217

Here is the end of the log that shows a success:

[...]
==== 10538 passed, 116 skipped, 3 xfailed, 10004 warnings in 759.59 seconds ====
The command "bash build_tools/travis/test_script.sh" exited with 0.
[...]
============= 36 passed, 4 skipped, 100 warnings in 21.60 seconds ==============
The command "bash build_tools/travis/test_docs.sh" exited with 0.
0.01s$ bash build_tools/travis/test_pytest_soft_dependency.sh
The command "bash build_tools/travis/test_pytest_soft_dependency.sh" exited with 0.
cache.2
store build cache
0.01s3.62schanges detected, packing new archive
uploading PR.12824/cache-osx-1660d3122ceb6c19de16ed2ec2206da034564d90d940bc6b41e622063713f077.tgz
cache uploaded
$ source build_tools/travis/after_success.sh

@jnothman
Copy link
Member Author

jnothman commented Dec 19, 2018 via email

@ogrisel
Copy link
Member

ogrisel commented Dec 20, 2018

Thanks @jnothman. The cd command in zsh has an issue on travis under mac (there some kind of rvm-related zsh callback that fails silently). I have pushed a workaround. I will remove the -x now.

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, once travis is green.

@ogrisel
Copy link
Member

ogrisel commented Dec 20, 2018

Because the mac build tends to be a little bit slower than the linux build, maybe we should put it at the top of the list to maximize effective parallelization and limiting the straggler effect. WDYT?

@jnothman
Copy link
Member Author

jnothman commented Dec 20, 2018 via email

@ogrisel
Copy link
Member

ogrisel commented Dec 20, 2018

Alright the macOS build seems stable enough. Let's merge.

@ogrisel ogrisel merged commit 951c4f1 into scikit-learn:master Dec 20, 2018
adrinjalali pushed a commit to adrinjalali/scikit-learn that referenced this pull request Jan 7, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
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.

5 participants