Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
ogrisel opened this Issue · 10 comments

2 participants

@ogrisel
Owner

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
@ogrisel
Owner

@fabianp any idea about what could cause this?

@fabianp
Owner

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

@fabianp fabianp referenced this issue from a commit in fabianp/scikit-learn
@fabianp fabianp FIX: check with tolerance on lars_path
Hopefully this will fix issue #3370 but I haven't checked.
67bfa1a
@fabianp
Owner

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

@fabianp fabianp referenced this issue from a commit
@fabianp fabianp FIX: check with tolerance on lars_path
Hopefully this will fix issue #3370 but I haven't checked.
0295fda
@fabianp fabianp referenced this issue from a commit
@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
@ogrisel ogrisel reopened this
@fabianp
Owner

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

@ogrisel ogrisel referenced this issue from a commit in ogrisel/scikit-learn
@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 referenced this issue from a commit
@ogrisel ogrisel FIX heisenfailure in test_lasso_lars_path_length
Fix for #3370: random failure under Python 32 bit and
Windows.
57630c4
@ogrisel
Owner

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.

@fabianp
Owner

cool :-)

@ogrisel
Owner

cool :-)

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

@fabianp
Owner
@ogrisel ogrisel closed this in d9067fa
@ogrisel
Owner

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

@kashif kashif referenced this issue from a commit in kashif/scikit-learn
@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 referenced this issue from a commit in IssamLaradji/scikit-learn
@ogrisel ogrisel FIX heisenfailure in test_lasso_lars_path_length
Tentative fix for #3370: random failure under Python 32 bit and
Windows.
0809437
@SaurabhJha SaurabhJha referenced this issue from a commit in SaurabhJha/scikit-learn
@ogrisel ogrisel FIX heisenfailure in test_lasso_lars_path_length
Tentative fix for #3370: random failure under Python 32 bit and
Windows.
f2b1e87
@IssamLaradji IssamLaradji referenced this issue from a commit in IssamLaradji/scikit-learn
@ogrisel ogrisel FIX heisenfailure in test_lasso_lars_path_length
Tentative fix for #3370: random failure under Python 32 bit and
Windows.
0f215c5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.