Heisen failure in # of alphas returned by lars_path on Windows with 32-bit Python #3370

Closed
ogrisel opened this Issue Jul 13, 2014 · 10 comments

2 participants

@ogrisel
scikit-learn member

There seems to be a randomly duplicated alpha from time to time:

======================================================================
FAIL: sklearn.linear_model.tests.test_least_angle.test_lasso_lars_path_length
----------------------------------------------------------------------
Traceback (most recent call last):
 File "C:\Python34\lib\site-packages\nose\case.py", line 198, in runTest
 self.test(*self.arg)
 File "C:\Python34\lib\site-packages\sklearn\linear_model\tests\test_least_angle.py", line 298, in test_lasso_lars_path_length
 assert_array_almost_equal(lasso.alphas_[:3], lasso2.alphas_)
 File "C:\Python34\lib\site-packages\numpy\testing\utils.py", line 811, in assert_array_almost_equal
 header=('Arrays are not almost equal to %d decimals' % decimal))
 File "C:\Python34\lib\site-packages\numpy\testing\utils.py", line 599, in assert_array_compare
 raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 6 decimals

(shapes (3,), (4,) mismatch)
 x: array([ 2.14804358, 2.01202713, 1.02466283])
 y: array([ 2.14804358, 2.01202713, 1.02466283, 1.02466283])
@ogrisel ogrisel added the Bug label Jul 13, 2014
@ogrisel
scikit-learn member

@fabianp any idea about what could cause this?

@fabianp
scikit-learn member

I can't find the reason by looking at the source code but I could look into it during the sprint

@fabianp fabianp added a commit to fabianp/scikit-learn that referenced this issue Jul 14, 2014
@fabianp fabianp FIX: check with tolerance on lars_path
Hopefully this will fix issue #3370 but I haven't checked.
67bfa1a
@fabianp
scikit-learn member

I made a temptative patch on pull request #3380 but I haven't tested on Windows

@fabianp fabianp added a commit that referenced this issue Jul 14, 2014
@fabianp fabianp FIX: check with tolerance on lars_path
Hopefully this will fix issue #3370 but I haven't checked.
0295fda
@fabianp fabianp added a commit that referenced this issue Jul 15, 2014
@fabianp fabianp FIX: check with tolerance on lars_path
Hopefully this will fix issue #3370 but I haven't checked.
e976967
@fabianp fabianp closed this Jul 15, 2014
@ogrisel ogrisel reopened this Jul 25, 2014
@fabianp
scikit-learn member

One idea is to replace tiny by tiny32 in e976967 but I'm just shooting in the dark here ...

@ogrisel ogrisel added a commit to ogrisel/scikit-learn that referenced this issue Sep 3, 2014
@ogrisel ogrisel FIX heisenfailure in test_lasso_lars_path_length
Tentative fix for #3370: random failure under Python 32 bit and
Windows.
dbfb25e
@ogrisel ogrisel added a commit that referenced this issue Sep 4, 2014
@ogrisel ogrisel FIX heisenfailure in test_lasso_lars_path_length
Fix for #3370: random failure under Python 32 bit and
Windows.
57630c4
@ogrisel
scikit-learn member

I think I have a working fixing that I am currently testing at:

https://ci.appveyor.com/project/ogrisel/scikit-learn/build/1.1.266

The previous fix was enough to fix the problem on the rackspace VMs with 32 bit python but not on the appveyor VMs for some reason.

@ogrisel ogrisel added a commit to ogrisel/scikit-learn that referenced this issue Sep 10, 2014
@ogrisel ogrisel FIX #3370: better lars alpha path inequality checks for 32 bit support 7caf8fe
@fabianp
scikit-learn member

cool :-)

@ogrisel
scikit-learn member

cool :-)

@fabianp is this a +1 to merge #3654?

@fabianp
scikit-learn member
@ogrisel ogrisel closed this in d9067fa Sep 11, 2014
@ogrisel
scikit-learn member

Merged, let see if appveyor is 100% happy now ;)

@kashif kashif added a commit to kashif/scikit-learn that referenced this issue Sep 12, 2014
@ogrisel ogrisel FIX heisenfailure in test_lasso_lars_path_length
Tentative fix for #3370: random failure under Python 32 bit and
Windows.
e594e55
@IssamLaradji IssamLaradji added a commit to IssamLaradji/scikit-learn that referenced this issue Oct 13, 2014
@ogrisel ogrisel FIX heisenfailure in test_lasso_lars_path_length
Tentative fix for #3370: random failure under Python 32 bit and
Windows.
0809437
@IssamLaradji IssamLaradji added a commit to IssamLaradji/scikit-learn that referenced this issue Oct 13, 2014
@ogrisel ogrisel FIX #3370: better lars alpha path inequality checks for 32 bit support 39005e2
@SaurabhJha SaurabhJha added a commit to SaurabhJha/scikit-learn that referenced this issue Oct 15, 2014
@ogrisel ogrisel FIX heisenfailure in test_lasso_lars_path_length
Tentative fix for #3370: random failure under Python 32 bit and
Windows.
f2b1e87
@SaurabhJha SaurabhJha added a commit to SaurabhJha/scikit-learn that referenced this issue Oct 15, 2014
@ogrisel ogrisel FIX #3370: better lars alpha path inequality checks for 32 bit support ba423c9
@IssamLaradji IssamLaradji added a commit to IssamLaradji/scikit-learn that referenced this issue Nov 22, 2014
@ogrisel ogrisel FIX heisenfailure in test_lasso_lars_path_length
Tentative fix for #3370: random failure under Python 32 bit and
Windows.
0f215c5
@IssamLaradji IssamLaradji added a commit to IssamLaradji/scikit-learn that referenced this issue Nov 22, 2014
@ogrisel ogrisel FIX #3370: better lars alpha path inequality checks for 32 bit support b882a31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment