Closed dawenl closed 13 years ago
I would like to add that I also get some segmentation faults when testing with 64-bit OS X 10.7, specifically everything from the manifold learning module crashes. Is there a "correct" way to build scikit-learn on this platform?
I have the previous scipy superpack installed; I couldn't for the life of me build scipy without its tests hanging.
Vlad
On Wed, Nov 9, 2011 at 2:51 AM, Dawen Liang reply@reply.github.com wrote:
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/kmeans.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.10git-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 <functools.partial object at 0x103a760a8>, 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 <class 'numpy.ma.core.MaskedArray'> 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!
Reply to this email directly or view it on GitHub: https://github.com/scikit-learn/scikit-learn/issues/435
On Tue, Nov 08, 2011 at 04:51:18PM -0800, Dawen Liang wrote:
Any help will be appreciated. Thanks!
Can you run the numpy tests without any problem? With the output that you gave us, we cannot diagnose where the problem is. We would need the output of 'nosetests -v sklearn' and idealy a stack trace from a C debugger, for instance gdb, as explained on http://scipy-lectures.github.com/advanced/debugging/index.html#debugging-segmentation-faults-using-gdb
Cheers,
Gaël
I found I failed the tests for both Numpy and Scipy for some mismatch problem...
Here is the output from 'nosetessts -v sklearn':
/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'
Affinity Propagation algorithm ... ok
Tests the DBSCAN algorithm with a similarity array. ... ok
Tests the DBSCAN algorithm with a feature vector array. ... ok
Tests the DBSCAN algorithm with a callable metric. ... ok
sklearn.cluster.tests.test_dbscan.test_pickle ... ok
Check that we obtain the correct solution for structured ward tree. ... ok
Check that we obtain the correct solution for unstructured ward tree. ... ok
Check that the height of ward tree is sorted. ... ok
Check that we obtain the correct number of clusters with Ward clustering. ... ok
Check that we obtain the correct solution in a simplistic case ... ok
Test scikit ward with full connectivity (i.e. unstructured) vs scipy ... ok
Check that connectivity in the ward tree is propagated correctly during ... /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)
ok
sklearn.cluster.tests.test_k_means.test_k_means_pp_init ... ok
sklearn.cluster.tests.test_k_means.test_mini_batch_k_means_pp_init ... ok
sklearn.cluster.tests.test_k_means.test_sparse_mini_batch_k_means_pp_init ... ok
sklearn.cluster.tests.test_k_means.test_k_means_pp_random_init ... ok
sklearn.cluster.tests.test_k_means.test_k_means_fixed_array_init ... ok
sklearn.cluster.tests.test_k_means.test_k_means_invalid_init ... ok
Check if copy_x=False returns nearly equal X after de-centering. ... ok
Check k_means with bad initialization and singleton clustering. ... /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: '
ok
sklearn.cluster.tests.test_k_means.test_mbk_means_fixed_array_init ... ok
sklearn.cluster.tests.test_k_means.test_sparse_mbk_means_fixed_array_init ... ok
sklearn.cluster.tests.test_k_means.test_sparse_mbk_means_pp_init ... ok
sklearn.cluster.tests.test_k_means.test_sparse_mbk_means_callable_init ... ok
sklearn.cluster.tests.test_k_means.test_k_means_fixed_array_init_fit ... ok
sklearn.cluster.tests.test_k_means.test_mbkm_fixed_array_init_fit ... ok
sklearn.cluster.tests.test_k_means.test_mbk_means ... ok
sklearn.cluster.tests.test_k_means.test_predict ... ok
sklearn.cluster.tests.test_k_means.test_predict_minibatch ... ok
sklearn.cluster.tests.test_k_means.test_predict_minibatch_sparse_input ... ok
sklearn.cluster.tests.test_k_means.test_transform ... ok
Check that increasing the number of init increases the quality ... ok
Test MeanShift algorithm ... ok
Test the bin seeding technique which can be used in the mean shift algorithm ... ok
sklearn.cluster.tests.test_spectral.test_spectral_clustering ... /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')
ok
sklearn.cluster.tests.test_spectral.test_spectral_clustering_sparse ... SKIP: XFailed Test
Tests Covariance module on a simple dataset. ... ok
Tests ShrunkCovariance module on a simple dataset. ... ok
Tests LedoitWolf module on a simple dataset. ... ok
Tests OAS module on a simple dataset. ... ok
Tests the FastMCD algorithm implementation ... ok
Tests the FastMCD algorithm implementation ... ok
sklearn.datasets.tests.test_20news.test_20news ... SKIP: Download 20 newsgroups to run this test
sklearn.datasets.tests.test_base.test_data_home ... ok
SKIP
sklearn.datasets.tests.test_mldata.test_mldata_filename ... ok
Test that fetch_mldata is able to download and cache a data set. ... ok
sklearn.datasets.tests.test_mldata.test_fetch_one_column ... ok
sklearn.datasets.tests.test_mldata.test_fetch_multiple_column ... ok
sklearn.datasets.tests.test_samples_generator.test_make_classification ... ok
sklearn.datasets.tests.test_samples_generator.test_make_regression ... ok
sklearn.datasets.tests.test_samples_generator.test_make_blobs ... ok
sklearn.datasets.tests.test_samples_generator.test_make_friedman1 ... ok
sklearn.datasets.tests.test_samples_generator.test_make_friedman2 ... ok
sklearn.datasets.tests.test_samples_generator.test_make_friedman3 ... ok
sklearn.datasets.tests.test_samples_generator.test_make_low_rank_matrix ... ok
sklearn.datasets.tests.test_samples_generator.test_make_sparse_coded_signal ... ok
sklearn.datasets.tests.test_samples_generator.test_make_sparse_uncorrelated ... ok
sklearn.datasets.tests.test_samples_generator.test_make_spd_matrix ... ok
sklearn.datasets.tests.test_samples_generator.test_make_swiss_roll ... ok
sklearn.datasets.tests.test_samples_generator.test_make_s_curve ... ok
sklearn.datasets.tests.test_svmlight_format.test_load_svmlight_file ... ok
sklearn.datasets.tests.test_svmlight_format.test_load_svmlight_files ... ok
sklearn.datasets.tests.test_svmlight_format.test_load_svmlight_file_n_features ... ok
sklearn.datasets.tests.test_svmlight_format.test_load_invalid_file ... ok
sklearn.datasets.tests.test_svmlight_format.test_not_a_filename ... ok
sklearn.datasets.tests.test_svmlight_format.test_invalid_filename ... ok
sklearn.datasets.tests.test_svmlight_format.test_dump ... ok
sklearn.decomposition.tests.test_dict_learning.test_dict_learning_shapes ... ok
sklearn.decomposition.tests.test_dict_learning.test_dict_learning_overcomplete ... ok
sklearn.decomposition.tests.test_dict_learning.test_dict_learning_reconstruction ... ok
sklearn.decomposition.tests.test_dict_learning.test_dict_learning_nonzero_coefs ... ok
sklearn.decomposition.tests.test_dict_learning.test_dict_learning_split ... ok
sklearn.decomposition.tests.test_dict_learning.test_dict_learning_online_shapes ... ok
sklearn.decomposition.tests.test_dict_learning.test_dict_learning_online_estimator_shapes ... ok
sklearn.decomposition.tests.test_dict_learning.test_dict_learning_online_overcomplete ... ok
sklearn.decomposition.tests.test_dict_learning.test_dict_learning_online_initialization ... ok
sklearn.decomposition.tests.test_dict_learning.test_dict_learning_online_partial_fit ... ok
sklearn.decomposition.tests.test_dict_learning.test_sparse_code ... ok
Test gram schmidt orthonormalization ... ok
Test the FastICA algorithm on very simple data. ... /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: "
ok
Test the FastICA algorithm on very simple data. ... ok
sklearn.decomposition.tests.test_kernel_pca.test_kernel_pca ... ok
sklearn.decomposition.tests.test_kernel_pca.test_kernel_pca_sparse ... ok
sklearn.decomposition.tests.test_kernel_pca.test_kernel_pca_linear_kernel ... ok
sklearn.decomposition.tests.test_kernel_pca.test_kernel_pca_n_components ... ok
sklearn.decomposition.tests.test_kernel_pca.test_kernel_pca_precomputed ... ok
sklearn.decomposition.tests.test_kernel_pca.test_kernel_pca_invalid_kernel ... ok
Test NNDSVD behaviour on negative input ... ok
Test that NNDSVD does not return negative values ... ok
Test NNDSVD error ... ok
Test NNDSVD variants correctness ... ok
Test model fit behaviour on negative input ... ok
Test that the decomposition does not contain negative values ... ok
Test that the fit is not too far away ... ok
Test NLS solver's behaviour on negative input ... ok
Test that NLS solver doesn't return negative values ... ok
Test that the NLS results should be close ... ok
Test that NMF.transform returns close values ... ok
Test sparseness ... ok
Test that sparse matrices are accepted as input ... /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.")
ok
PCA on dense arrays ... ok
Check that PCA output has unit-variance ... ok
Test that the projection of data is correct ... ok
Test that the projection of data can be inverted ... ok
Test that the projection by RandomizedPCA on dense data is correct ... ok
Test that the projection by RandomizedPCA on list data is correct ... ok
Test that RandomizedPCA is inversible on dense data ... ok
Test that the projection by RandomizedPCA on sparse data is correct ... ok
Test that RandomizedPCA is inversible on sparse data ... ok
Check automated dimensionality setting ... ok
TODO: explain what this is testing ... ok
TODO: explain what this is testing ... ok
sklearn.decomposition.tests.test_pca.test_infer_dim_3 ... ok
sklearn.decomposition.tests.test_pca.test_infer_dim_by_explained_variance ... ok
Test that probabilistic PCA yields a reasonable score ... ok
Test that probabilistic PCA correctly separated different datasets ... ok
The homoscedastic model should work slightly worth ... ok
Check that ppca select the right model ... ok
sklearn.decomposition.tests.test_sparse_pca.test_correct_shapes ... /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))
ok
sklearn.decomposition.tests.test_sparse_pca.test_fit_transform ... ok
sklearn.decomposition.tests.test_sparse_pca.test_fit_transform_tall ... ok
sklearn.decomposition.tests.test_sparse_pca.test_initialization ... ok
sklearn.decomposition.tests.test_sparse_pca.test_mini_batch_correct_shapes ... ok
sklearn.decomposition.tests.test_sparse_pca.test_mini_batch_fit_transform ... ok
sklearn.externals.joblib.test.test_format_stack.test_safe_repr ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_args({'y': 0, 'x': 1}, {'y': 0, 'x': 1}) ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_args({'y': 0}, {'y': 0}) ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_args({'x': 0}, {'x': 0}) ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_args({'x': 0}, {'x': 0}) ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_args({}, {}) ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_args({'y': 1, 'x': 0}, {'y': 1, 'x': 0}) ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_args({'x': 2}, {'x': 2}) ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_args({'x': 2}, {'x': 2}) ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_args({'x': 1}, {'x': 1}) ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_args_method ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_varargs({'y': 0, 'x': 1, '*': [], '**': {}}, {'y': 0, 'x': 1, '*': [], '**': {}}) ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_varargs({'y': 2, 'x': 1, '*': [3, 4], '**': {}}, {'y': 2, 'x': 1, '*': [3, 4], '**': {}}) ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_varargs({'y': 25, 'x': 1, '*': [], '**': {'ee': 2}}, {'y': 25, 'x': 1, '*': [], '**': {'ee': 2}}) ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_varargs({'y': 2, 'x': 1, '**': {'ee': 2}}, {'y': 2, 'x': 1, '**': {'ee': 2}}) ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_kwargs ... ok
sklearn.externals.joblib.test.test_func_inspect.test_filter_args_2 ... /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 <functools.partial object at 0x10f9aa520>, ignore list will not work.
nose.tools.assert_equal(filter_args(ff, ['y'], 1),
ok
sklearn.externals.joblib.test.test_func_inspect.test_func_name('f', 'f') ... ok
sklearn.externals.joblib.test.test_func_inspect.test_func_name('g', 'g') ... ok
Check that func_inspect is robust and will work on weird objects ... ok
Make sure that calling the same method on two different instances ... ok
Make sure that filter_args returns decent error messages, for the ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Smoke test hash on various types. ... ok
Check that hashing instance methods works ... ok
Test hashing with numpy arrays. ... ok
Test hashing with numpy arrays. ... ok
Test hashing with numpy arrays. ... ok
Test hashing with numpy arrays. ... ok
Test hashing with numpy arrays. ... ok
Test hashing with numpy arrays. ... ok
Test hashing with numpy arrays. ... ok
Test hashing with numpy arrays. ... ok
Test hashing with numpy arrays. ... ok
Test hashing with numpy arrays. ... ok
Test hashing with numpy arrays. ... ok
Test hashing with numpy arrays. ... ok
Check that memmap and arrays hash identically if coerce_mmap is ... ok
Check that memmap and arrays hash identically if coerce_mmap is ... ok
Check the performance of hashing numpy arrays: ... ok
Check the performance of hashing numpy arrays: ... ok
Make sure that calling the same method on two different instances ... ok
Make sure that calling the same _cached_ method on two different ... ok
A simple smoke test for PrintTime. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Simple test of memory lazy evaluation. ... ok
Test memory with cachedir=None: no memoize ... ok
Test memory with cachedir=None: no memoize ... ok
Test memory with cachedir=None: no memoize ... ok
Test memory with cachedir=None: no memoize ... ok
Test memory with a function with keyword arguments. ... ok
Test memory with a function with keyword arguments. ... ok
Test memory with a function with keyword arguments. ... ok
Test memory with a function with keyword arguments. ... ok
Test memory with a function with keyword arguments. ... ok
Test memory with a function with keyword arguments. ... ok
Test memory with a function with keyword arguments. ... ok
Test memory with a function with keyword arguments. ... ok
Test memory with a function with keyword arguments. ... ok
Test memory with a function with keyword arguments. ... ok
Test memory with a function with keyword arguments. ... ok
Test memory with a function with keyword arguments. ... ok
Test memory with a function with a lambda. ... ok
Test memory with a function with a lambda. ... ok
Test memory with a function with a lambda. ... ok
Test memory with a function with a lambda. ... ok
Test memory with a function with a lambda. ... ok
Test memory with a function with a lambda. ... ok
Test memory with a function with a lambda. ... ok
Test memory with a function with a lambda. ... ok
Test memory with a function with a lambda. ... ok
Test memory with a function with a lambda. ... ok
Test memory with a function with a lambda. ... ok
Test memory with a function with a lambda. ... ok
Check that name collisions with functions will raise warnings ... ok
Check that name collisions with functions will raise warnings ... ok
Check that multiple use of lambda will raise collisions ... ok
Check that multiple use of lambda will raise collisions ... ok
Check that multiple use of lambda will raise collisions ... ok
Check that collisions impossible to detect will raise appropriate ... ok
Check that collisions impossible to detect will raise appropriate ... ok
Test memory with functools.partial. ... ok
Test memory with functools.partial. ... ok
Test memory with functools.partial. ... ok
Test memory with functools.partial. ... ok
Test memory with functools.partial. ... ok
Test memory with functools.partial. ... ok
Test memory with functools.partial. ... ok
Test memory with functools.partial. ... ok
Test memory with functools.partial. ... ok
Test memory with functools.partial. ... ok
Test memory with functools.partial. ... ok
Test memory with functools.partial. ... ok
Smoke test memory with a function with a function defined in an eval. ... ok
Check that if a function has a side effect in its arguments, it ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Test memory with a function with numpy arrays. ... ok
Smoketest the exception handling of Memory. ... ok
Smoketest the exception handling of Memory. ... ok
Smoketest the exception handling of Memory. ... ok
Test the ignore feature of memory ... ok
Test the ignore feature of memory ... ok
Test the ignore feature of memory ... ok
Test the ignore feature of memory ... ok
Test the creation of the memory cache directory for the function. ... ok
Test the creation of the memory cache directory for the function. ... ok
Test the creation of the memory cache directory for the function. ... ok
Test the creation of the memory cache directory for the function. ... ok
Test the creation of the memory cache directory for the function. ... ok
Test the creation of the memory cache directory for the function. ... ok
Test the creation of the memory cache directory for the function. ... ok
Test the memorized functions can be pickled and restored. ... ok
Test the signature formatting. ... ok
Test the signature formatting. ... ok
Test the format signature formatting with numpy. ... ok
sklearn.externals.joblib.test.test_my_exceptions.test_inheritance ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types(None, None) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types(<type 'type'>, <type 'type'>) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types(True, True) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types(1, 1) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types(1L, 1L) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types(1.0, 1.0) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types((1+0j), (1+0j)) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types('1', '1') ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types(u'1', u'1') ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types((), ()) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types([], []) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types({}, {}) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types(<type 'file'>, <type 'file'>) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types(<type 'buffer'>, <type 'buffer'>) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types(<built-in function len>, <built-in function len>) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types(<class sklearn.externals.joblib.test.test_numpy_pickle._class at 0x10f5c2668>, <class sklearn.externals.joblib.test.test_numpy_pickle._class at 0x10f5c2668>) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_standard_types(<class 'sklearn.externals.joblib.test.test_numpy_pickle._newclass'>, <class 'sklearn.externals.joblib.test.test_numpy_pickle._newclass'>) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(2, 2) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(3, 3) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(4, 4) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_numpy_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_memmap_persistence(True,) ... ok
sklearn.externals.joblib.test.test_numpy_pickle.test_masked_array_persistence ... ok
sklearn.externals.joblib.test.test_parallel.test_cpu_count ... ok
sklearn.externals.joblib.test.test_parallel.test_simple_parallel([0, 1, 4, 9, 16, 25, 36, 49, 64, 81], [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]) ... ok
sklearn.externals.joblib.test.test_parallel.test_simple_parallel([0, 1, 4, 9, 16, 25, 36, 49, 64, 81], [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]) ... ok
sklearn.externals.joblib.test.test_parallel.test_simple_parallel([0, 1, 4, 9, 16, 25, 36, 49, 64, 81], [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]) ... ok
Check the keyword argument processing of pmap. ... ok
Check the keyword argument processing of pmap. ... ok
Check that pmap captures the errors when it is passed an object ... ok
Check that error are captured, and that correct exceptions ... ok
Test that with only one job, Parallel does act as a iterator. ... ok
Check that using pre_dispatch Parallel does indeed dispatch items ... ok
Make sure that exception raised during dispatch are indeed captured ... ok
sklearn.externals.joblib.test.test_parallel.test_joblib_exception ... ok
sklearn.externals.joblib.test.test_parallel.test_safe_function ... ok
Failure: TypeError (ufunc 'divide' output (typecode 'd') could not be coerced to provided output parameter (typecode 'l') according to the casting rule ''same_kind'') ... ERROR
sklearn.feature_extraction.tests.test_text.test_strip_accents ... ok
sklearn.feature_extraction.tests.test_text.test_to_ascii ... ok
sklearn.feature_extraction.tests.test_text.test_word_analyzer_unigrams ... ok
sklearn.feature_extraction.tests.test_text.test_word_analyzer_unigrams_and_bigrams ... ok
sklearn.feature_extraction.tests.test_text.test_char_ngram_analyzer ... ok
sklearn.feature_extraction.tests.test_text.test_countvectorizer_custom_vocabulary ... ok
sklearn.feature_extraction.tests.test_text.test_countvectorizer_custom_vocabulary_pipeline ... ok
sklearn.feature_extraction.tests.test_text.test_fit_countvectorizer_twice ... ok
sklearn.feature_extraction.tests.test_text.test_vectorizer ... ok
sklearn.feature_extraction.tests.test_text.test_vectorizer_max_features ... ok
sklearn.feature_extraction.tests.test_text.test_vectorizer_max_df ... ok
sklearn.feature_extraction.tests.test_text.test_vectorizer_inverse_transform ... ok
sklearn.feature_extraction.tests.test_text.test_dense_vectorizer_pipeline_grid_selection ... ok
sklearn.feature_extraction.tests.test_text.test_pickle ... ok
Test Chi2 feature extraction ... ok
Test that our f_oneway gives the same result as scipy.stats ... ok
Test whether the F test yields meaningful results ... ok
Test whether the F test yields meaningful results ... ok
Test whether the F test yields meaningful results ... ok
Test whether the relative univariate feature selection ... ok
Test whether the relative univariate feature selection ... ok
Test whether the relative univariate feature selection ... ok
Test whether the relative univariate feature selection ... ok
Test whether the relative univariate feature selection ... ok
Test whether the relative univariate feature selection ... ok
Test whether the relative univariate feature selection ... ok
Test whether the relative univariate feature selection ... ok
Test whether the relative univariate feature selection ... ok
Test whether the relative univariate feature selection ... ok
Test whether the relative univariate feature selection ... ok
sklearn.feature_selection.tests.test_rfe.test_rfe ... ok
sklearn.feature_selection.tests.test_rfe.test_rfecv ... ok
MLE estimation of a one-dimensional Gaussian Process model. ... ok
MLE estimation of a two-dimensional Gaussian Process model accounting for ... ok
sklearn.gaussian_process.tests.test_gaussian_process.test_wrong_number_of_outputs ... ok
Repeat test_1d and test_2d for several built-in correlation ... ok
Repeat test_1d and test_2d with given regression weights (beta0) for ... ok
Check that the predict method works with dense coef_ and sparse X ... Segmentation fault: 11
For gdb, according to the doc, it seems that I need to run the file which causes segmentation fault? I don't really know how to trigger the error inside the debugger, any hints? Sorry I am not that familiar with gdb.
You need to find where the nosetests executable is locate:
$ which nosetests
/usr/bin/nosetests
Then you run gdb as such
$ gdb python
...
(gdb) run /usr/bin/nosetests sklearn
Hi Dawen,
I can confirm the error but its origin is not in sklearn but in numpy (current dev version). Please try the following::
import numpy as np
from scipy import sparse as sp
A = np.random.rand(10, 10)
S = sp.csr_matrix(A)
_ = np.dot(A, A) # this works OK
_ = np.dot(S, S) # this segfaults!
I'll check with the numpy folks if that's intended behaviour - if so, we have to change our sparse matrix handling....
I'll keep you posted.
thanks, Peter
2011/11/9 Dawen Liang reply@reply.github.com:
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/kmeans.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.10git-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 <functools.partial object at 0x103a760a8>, 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 <class 'numpy.ma.core.MaskedArray'> 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!
Reply to this email directly or view it on GitHub: https://github.com/scikit-learn/scikit-learn/issues/435
Peter Prettenhofer
I can confirm the error but its origin is not in sklearn but in numpy (current dev version).
Thanks for the investigating work Peter. Dawen, if this is confirmed, can you please close the issue on github, so that it doesn't linger around.
G
Hi Peter,
You are exactly right! Thanks very much for pointing out the problem. I will close the issue and hopefully could hear from you later about the fix in numpy/scikits. It's not a big deal for now since I won't really use sparse for my current work.
Dawen
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:
Any help will be appreciated. Thanks!