[scikit-learn] How to test on PYTHON_ARCH=32 with mac?

Matthew Brett matthew.brett at gmail.com
Wed Jul 20 12:00:49 EDT 2016

On Wed, Jul 20, 2016 at 9:16 AM, Matthew Brett <matthew.brett at gmail.com> wrote:
> On Wed, Jul 20, 2016 at 9:09 AM, Olivier Grisel
> <olivier.grisel at ensta.org> wrote:
>>> I believe this `arch -i386`  only works as a prefix for Python.org Python, but I'm happy to be corrected.
>> Then the following should work:
>> arch -i386 python -c "import nose; nose.main()" sklearn
> Sorry - I should have been clear - this does work in selecting 32-bit
> for the tests, using a nosetests installed into a Python.org Python
> environment:
> arch -i386 nosetests sklearn

Actually, I took the liberty of adding the OSX 32-bit tests to the
wheel build tests, and scikit-learn 0.17.1 has one failure on 32-bit



ERROR: sklearn.tree.tests.test_tree.test_huge_allocations
Traceback (most recent call last):
  File "/Users/travis/build/MacPython/scikit-learn-wheels/venv/lib/python3.5/site-packages/nose/case.py",
line 198, in runTest
  File "/Users/travis/build/MacPython/scikit-learn-wheels/venv/lib/python3.5/site-packages/sklearn/tree/tests/test_tree.py",
line 1032, in test_huge_allocations
    assert_raises(MemoryError, clf.fit, X, y)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/case.py",
line 727, in assertRaises
    return context.handle('assertRaises', args, kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/case.py",
line 176, in handle
    callable_obj(*args, **kwargs)
  File "/Users/travis/build/MacPython/scikit-learn-wheels/venv/lib/python3.5/site-packages/sklearn/tree/tree.py",
line 348, in fit
  File "sklearn/tree/_tree.pyx", line 291, in
OverflowError: Python int too large to convert to C long

No failures for 32-bit Linux though.



More information about the scikit-learn mailing list