Repository navigation
[WIP]: Add 32bit testing in CI for scikit-learn - #11515
jrmlhermitte wants to merge 9 commits into
Conversation
|
Current failed tests: 3 AssertionErrors , example: |
| elif [[ "$DISTRIB" == "32bit" ]]; then | ||
| # At the time of writing numpy 1.9.1 is included in the travis | ||
| # virtualenv but we want to use the numpy installed through apt-get | ||
| docker run --rm -v`pwd`:/io quay.io/pypa/manylinux1_i686 /bin/bash -c "set -e; export PATH=/opt/python/cp36-cp36m/bin:$PATH; pip install numpy scipy cython nose pytest; cd /io; pip install -e l; pytest -l sklearn" |
There was a problem hiding this comment.
Maybe add a script with the commands under build_tools/travis/install_docker_32bit.sh ?
|
doctests are explicitly skipped on 32bit in the makefile because we didn't felt it was worth fixing them. |
|
I agree on CircleCI and will get this started later. For now, three tests don't pass. I'll start with the first, any ideas on this one? assert_array_almost_equal(dense_svm.dual_coef_,
> sparse_svm.dual_coef_.toarray())
E AssertionError:
E Arrays are not almost equal to 6 decimals
E
E (mismatch 83.33333333333333%)
E x: array([[0.993464, 0.258659, 0.264268, 0.212662, 0.270947, 1. ]])
E y: array([[0.993326, 0.263301, 0.259931, 0.216799, 0.266643, 1. ]])
sklearn/svm/tests/test_sparse.py:53: AssertionErrorWhen I debug, the main difference I see is that the dataset in the 32bit version is a np. I tested and raised an Exception purposely to see the datasets on a 64bit machine: Any ideas on this? I'll dig but if someone with knowledge of this function has a good idea it would help, thanks! |
|
changing |
| # test sample 1 | ||
| X = np.array([[-2, -1], [-1, -1], [-1, -2], [1, 1], [1, 2], [2, 1]]) | ||
| X_sp = sparse.lil_matrix(X) | ||
| X_sp = sparse.lil_matrix(X, dtype=np.int64) |
There was a problem hiding this comment.
Thought this would fix it but did not. Will wait for travis to run so that we may all see the errors.
|
The Travis tests take forever to pass so I'm looking into this first error. The difference is here: 32 bit: 64 bit: EDIT: updated the 64 bit test output which was incorrect. |
|
update: the tests were not the same. The test faisl on the 'poly' kernel. For 64 bit: |
a04156b to
34136f6
Compare
|
It works but there is one problem with the building. We can't use the compiler cache. From quickly reading the code, it appears to me that /usr/lib/ccache offers a cache aware version of gcc and g++. However, since these are compilers from a 64 bit machine, we can't use them. I don't know too much about this, does anyone else possibly have a clever idea around this? If we can't fix this, then testing on 32 bit will take much longer (currently seems like it's twice as long) |
|
Here is a summary of the failing functions below. After discussion with @rth we can either:
test_sparse_oneclasssvm() test_non_meta_estimators[OneClassSVM-OneClassSVM-check_outliers_train] sklearn/utils/estimator_checks.py:1498: AssertionError |
|
Thanks for this analysis @jrmlhermitte , it is very much appreciated! |
|
Looked at the first of the three errors with @ogrisel . After some investigation, we found that the problem seems to lie in the non-sparse libsvm code. This is not using BLAS. An option suggested by @ogrisel is to raise an |
|
@jrmlhermitte Thanks for your work on this. Do you plan to continue this PR? FYI I merged master in, so you would need to run a |
|
A little busy today but could look at it near end of week. If someone wants to take over feel free as well :). |
9ccdc87 to
a5ff077
Compare
|
Sorry for my delay. Going to let it run to see if we have more failures. I'll try to check back on it later. |
bb26614 to
82789c2
Compare
Still a failure, not sure what is going on (will check later): Note: I have changed the |
|
Since we're moving away from travis (we've already disabled all non-cron-jobs from our CI), I guess it makes sense to maintain new CI tests envs for Azure only, doesn't it? |
|
yes, that would be nice. Travis is very out of date. |
fb543fe to
72e06dc
Compare
|
Best option may be to try Will need to investigate another week unless someone else wants to take a crack at it. Update: I'm not sure what is causing this. |
5891b2e to
833bd88
Compare
14cee70 to
aa2319b
Compare
c0052d6 to
6838628
Compare
6661731 to
5c836c3
Compare
|
Tried a very simple test just now. Tried these two docker images:
First one fails, but second one passes just fine. The first one fails during the "Initialize Containers" step: I suspect the 32 bit image is incompatible with something azure needs to get working with the docker image. Maybe the version of node they install? It's all a bit opaque to me. Anyone know someone knowledgeable in azure? |
|
How about the 32bit Debian image? Do you get the same error? (it should work mostly without changing the setup otherwise) |
|
Yeah same thing with the quay.io image :-( |
Maybe @mickeygousset would have some suggestions. |
|
azure needs nodejs to be installed in the container |
|
Thanks, I think I tried that as well with a few other things (I found it at some point but couldn't find that link again). It doesn't work. Here it is to keep it documented. Tried this just now: uploaded to: got: I wish azure were more descriptive of their errors :( |
|
Oh and in the docker image, I see: |
|
I'm closing this because it has grown quite stale, and azure doesn't work. |
WIP: Not complete yet. Tested locally. 3 tests fail (and 10 docstring tests fail, which I disabled). Now trying to run on Travis.
Reference Issues/PRs
Attempt to close #9352
What does this implement/fix? Explain your changes.
Any other comments?