scikit-learn/scikit-learn — Issue #435: Segmentation fault while running sklearn.test()
Author: dawenl
Created: 2011-11-09 00:51:16+00:00
State: open

Hi all,

Thanks to the help this afternoon, I finally got sklearn working with my test logistic regression. However, while I run the test, I got the segmentation fault at last, here is the output (very long), it seems to me that something is not implemented yet and not sure if that's the cause of the error:

Running unit tests and doctests for sklearn
NumPy version 2.0.0.dev-7297785
NumPy is installed in /Library/Python/2.7/site-packages/numpy-2.0.0.dev_7297785_20111104-py2.7-macosx-10.7-x86_64.egg/numpy
Python version 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]
nose version 1.1.2
/Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/cross_val.py:2: UserWarning: sklearn.cross_val namespace is deprecated in version 0.9 and will be removed in version 0.11. Please use sklearn.cross_validation instead.
warnings.warn('sklearn.cross_val namespace is deprecated in version 0.9'
/Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/hmm.py:16: UserWarning: sklearn.hmm is orphaned, undocumented and has known numerical stability issues. If nobody volunteers to write documentation and make it more stable, this module will be removed in version 0.11.
warnings.warn('sklearn.hmm is orphaned, undocumented and has known numerical'
.........../Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/neighbors/base.py:23: UserWarning: kneighbors: neighbor k+1 and neighbor k have the same distance: results will be dependent on data order.
warnings.warn(msg)
......../Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/cluster/k_means_.py:219: UserWarning: Explicit initial center position passed: performing only one init in the k-means
warnings.warn('Explicit initial center position passed: '
.............../Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/cluster/spectral.py:77: UserWarning: pyamg not available, using scipy.sparse
warnings.warn('pyamg not available, using scipy.sparse')
.S...................S.S.........................FFF............/Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/decomposition/fastica_.py:199: UserWarning: Please note: the interface of fastica has changed: X is now assumed to be of shape [n_samples, n_features]
warnings.warn("Please note: the interface of fastica has changed: "
..................../Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/decomposition/nmf.py:237: UserWarning: Iteration limit reached in nls subproblem.
warnings.warn("Iteration limit reached in nls subproblem.")
.................../Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/decomposition/sparse_pca.py:146: RuntimeWarning: invalid value encountered in divide
U /= np.sqrt((U ** 2).sum(axis=0))
......................./Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/externals/joblib/test/test_func_inspect.py:101: UserWarning: Cannot inspect object , ignore list will not work.
nose.tools.assert_equal(filter_args(ff, ['y'], 1),
........................................................................................________________________________________________________________________________
test_memory setup
________________________________________________________________________________
________________________________________________________________________________
test_memory teardown
________________________________________________________________________________
..________________________________________________________________________________
test_memory setup
________________________________________________________________________________
......................................................................................................................________________________________________________________________________________
test_memory teardown
________________________________________________________________________________
.________________________________________________________________________________
setup numpy_pickle
________________________________________________________________________________
.......................................Failed to save to .npy file:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/externals/joblib/numpy_pickle.py", line 62, in save
self.np.save(filename, obj)
File "/Library/Python/2.7/site-packages/numpy-2.0.0.dev_7297785_20111104-py2.7-macosx-10.7-x86_64.egg/numpy/lib/npyio.py", line 434, in save
format.write_array(fid, arr)
File "/Library/Python/2.7/site-packages/numpy-2.0.0.dev_7297785_20111104-py2.7-macosx-10.7-x86_64.egg/numpy/lib/format.py", line 409, in write_array
array.tofile(fp)
File "/Library/Python/2.7/site-packages/numpy-2.0.0.dev_7297785_20111104-py2.7-macosx-10.7-x86_64.egg/numpy/ma/core.py", line 5380, in tofile
raise NotImplementedError("Not implemented yet, sorry...")
NotImplementedError: Not implemented yet, sorry...

.________________________________________________________________________________
teardown numpy_pickle
________________________________________________________________________________
...............E..................................F................/Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/linear_model/least_angle.py:218: RuntimeWarning: invalid value encountered in divide
z = -coefs[n_iter, active] / least_squares
....Segmentation fault: 11

Any help will be appreciated. Thanks!