-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
TST Extend tests for scipy.sparse.*array
#27090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, I am starting working on |
scipy.sparse.*array
scipy.sparse.*array
Hi! I'm starting work on |
Hi! I'm starting work on |
Hi, I am starting working on |
Working on |
I am working on |
I am working on |
@jjerphan I think we should add a step for testing that types are maintained in cases where a sparse array can be returned. E.g.:
|
Indeed; thanks for mentioning that, @ivirshup. I updated the issue's description accordingly. |
If we have to modify the code to support the |
I would consider this support and an enhancement, I think. |
Hi, I am starting working on |
Hi, I am starting working on |
Hi! I'm starting work on |
Hey ! Can anyone help me with the setup of the project. When I run the pytest command I'm facing import error conflict between the sklearn that I installed and the one I'm working with. ImportError while loading conftest |
@StefanieSenger: I just had a look, and your analysis is right: nothing to be done for |
Thank you, @jjerphan :) |
This also was the case for other files, and I removed their items from the list. |
Hi, I am starting working on |
Hey @KartikeyBartwal , I already did some work on this previously. |
Hey, I'm starting work on |
Oh my bad! |
Please share the updates from your side. I'll try to contribute to the PR |
|
After a brief discussion with @Charlie-XIAO in #27723 (comment), we might want to clarify the changelog entry which has been introduced to clarify explicitly that all the interfaces supporting sparse matrices now explicitly support sparse areays. What do you think? |
I agree, with modifying the tests, the support for sparse arrays is made sure, but not introduced. Changing this phrase from the changelog maybe, into "now tested to support SciPy sparse array"?
|
When this issue is closed, I think we can adapt the changelog entry to mention that all interfaces supporting sparse matrices now support sparse arrays (potentially removing the enumeration of interfaces if it is too verbose). What do you think? Is this sufficient? |
Hello @y-vectorfield, Thank you. Yes, we will be there to help you. |
Hello, @jjerphan, Second: I could not test using pytest. $ pytest sklearn/utils/_testing.py
======================================================================================== test session starts =========================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/skuser/dev/scikit-learn
configfile: setup.cfg
plugins: cov-4.1.0
collected 2 items
sklearn/utils/_testing.py ss [100%]
========================================================================================= 2 skipped in 0.07s ========================================================================================= |
I made PRs on sklearn/utils/tests/test_param_validation.py #27317. Here is my PRs below: |
The last PRs have been merged. Thanks a lot everyone! @jjerphan I think all tasks here are completed. Should we close now? |
Thank you for the heads-up, @Charlie-XIAO ! I will take some time to double-check it before we close it as completed. |
Everything looks good to me. Thank you everyone for your involvement! |
Uh oh!
There was an error while loading. Please reload this page.
SciPy sparse matrices (i.e.
scipy.sparse.*matrix
) are tested but their sparse arrays counterpart (i.e.scipy.sparse.*array
) aren't yet will become ubiquitous (see #26418).Tests and their parameterizations (when they exist) must be adapted to include
scipy.sparse.*array
conditionally to versions of SciPy that support them (i.e.scipy>=1.8
).Steps
ℹ️ You can take #27095 as an example for your PRs.
1. Choose one of the files to adapt
<filename>
) on this issue so no-one ends up duplicating work. E.g.Please double check as this list might be outdated, but candidate files might be:
scipy.sparse.*array
intest_glm.py
#27107scipy.sparse.*array
insklearn/cluster/tests/test_affinity_propagation
#27095scipy.sparse.*array
insklearn/cluster/tests/test_bicluster.py
#27093scipy.sparse.*array
insklearn/cluster/tests/test_bisect_k_means.py
#27099scipy.sparse.*array
intest_nmf.py
#27100scipy.sparse.*array
insklearn/svm/tests/test_bounds.py
#27121scipy.sparse.*array
insklearn/cluster/tests/test_hdbscan.py
#27116scipy.sparse.*array
insklearn/cluster/tests/test_dbscan.py
+test_birch.py
+test_column_transformer.py
#27097scipy.sparse.*array
insklearn/svm/tests/test_svm.py
#27128scipy.sparse.*array
insklearn/decomposition/tests/test_incremental_pca.py
#27131scipy.sparse.*array
insklearn/linear_model/tests/test_linear_loss.py
#27133scipy.sparse.*array
insklearn/decomposition/tests/test_kernel_pca.py
#27143scipy.sparse.*array
insklearn/decomposition/tests/test_online_lda.py
#27144scipy.sparse.*array
insklearn/ensemble/tests/test_weight_boosting.py
#27148scipy.sparse.*array
insklearn/decomposition/tests/test_pca.py
#27150scipy.sparse.*array
insklearn/neighbors/tests/test_nearest_centroid.py
#27132scipy.sparse.*array
insklearn/cluster/tests/test_hierarchical.py
#27101scipy.sparse.*array
insklearn/linear_model/tests/test_perceptron.py
#27160scipy.sparse.*array
intest_lof.py
#27162scipy.sparse.*array
intest_mlp.py
#27163scipy.sparse.*array
insklearn/tests/test_multioutput.py
#27171scipy.sparse.*array
insklearn/utils/tests/test_class_weight.py
#27188scipy.sparse.*array
intest_encoders.py
#27289scipy.sparse.*array
insklearn/ensemble/tests/test_bagging.py
#27170scipy.sparse.*array
insklearn/feature_selection/tests/test_mutual_info.py
#27173scipy.sparse.*array
insklearn/feature_selection/tests/test_base.py
#27175scipy.sparse.*array
insklearn/feature_selection/tests/test_chi2.py
#27176scipy.sparse.*array
insklearn/feature_selection/tests/test_rfe.py
#27177scipy.sparse.*array
insklearn/feature_selection/tests/test_sequential.py
#27178scipy.sparse.*array
insklearn/utils/tests/test_utils.py
#27201scipy.sparse.*array
insklearn/utils/tests/test_set_output.py
#27202scipy.sparse.*array
insklearn/linear_model/tests/test_sag.py
#27206scipy.sparse.*array
insklearn/impute/tests/test_impute.py
#27208scipy.sparse.*array
insklearn/linear_model/tests/test_logistic.py
#27210scipy.sparse.*array
insklearn/linear_model/tests/test_huber.py
#27211scipy.sparse.*array
insklearn/metrics/tests/test_ranking.py
#27212scipy.sparse.*array
insklearn/tests/test_naive_bayes.py
#27213scipy.sparse.*array
insklearn/ensemble/tests/test_stacking.py
#27214scipy.sparse.*array
insklearn/tests/test_dummy.py
#27215scipy.sparse/*array
insklearn/ensemble/tests/test_forest
#27216scipy.sparse/*array
insklearn/ensemble/tests/test_gradient_boosting
#27217scipy.sparse/*array
insklearn/ensemble/tests/test_iforest
#27218scipy.sparse/*array
insklearn/feature_extraction/tests/test_text
#27219scipy.sparse.*array
insklearn/datasets/tests/test_svmlight_format.py
#27220scipy.sparse.*array
insklearn/manifold/tests/test_t_sne.py
#27221scipy.sparse/*array
insklearn/feature_selection/tests/test_variance_threshold
#27222scipy.sparse.*array
insklearn/tests/test_multiclass.py
#27223scipy.sparse.*array
insklearn/tree/tests/test_monotonic_tree.py
#27224scipy.sparse/*array
insklearn/linear_model/tests/test_base
#27225scipy.sparse/*array
insklearn/linear_model/tests/test_coordinate_descent
#27226scipy.sparse.*array
insklearn/preprocessing/tests/test_label.py
#27227scipy.sparse/*array
insklearn/linear_model/tests/test_quantile
#27228scipy.sparse.*array
insklearn/metrics/tests/test_dist_metrics.py
#27229scipy.sparse.*array
insklearn/metrics/tests/test_pairwise_distances_reduction.py
#27230scipy.sparse.*array
insklearn/metrics/tests/test_classification.py
#27231scipy.sparse/*array
insklearn/linear_model/tests/test_ransac
#27233scipy.sparse/*array
insklearn/linear_model/tests/test_ridge
#27235scipy.sparse/*array
insklearn/linear_model/tests/test_sparse_coordinate_descent
#27237scipy.sparse.*array
insklearn/feature_selection/tests/test_feature_select.py
#27239scipy.sparse/*array
insklearn/metrics/cluster/tests/test_unsupervised
#27241scipy.sparse.*array
insklearn/utils/tests/test_sparsefuncs.py
#27242scipy.sparse/*array
insklearn/model_selection/tests/test_split
#27246scipy.sparse/*array
insklearn/neural_network/tests/test_rbm
#27252scipy.sparse/*array
insklearn/preprocessing/tests/test_data
#27253scipy.sparse/*array
insklearn/preprocessing/tests/test_function_transformer
#27254scipy.sparse.*array
insklearn/tests/test_calibration.py
#27257scipy.sparse/*array
insklearn/tree/tests/test_tree
#27261scipy.sparse/*array
insklearn/utils/tests/test_extmath
#27262scipy.sparse.*array
insklearn/tests/test_kernel_ridge.py
#27270scipy.sparse.*array
insklearn/linear_model/tests/test_passive_aggressive.py
#27273scipy.sparse/*array
insklearn/utils/tests/test_multiclass
#27274scipy.sparse/*array
insklearn/utils/tests/test_testing
#27276scipy.sparse/*array
insklearn/impute/tests/test_common
#27277scipy.sparse.*array
insklearn/tests/test_pipeline.py
#27278scipy.sparse.*array
insklearn/tests/test_kernel_approximation.py
#27301scipy.sparse.*array
insklearn/utils/tests/test_mocking.py
#27319scipy.sparse.*array
insklearn/datasets/tests/test_openml.py
#27323scipy.sparse.*array
insklearn/feature_selection/tests/test_base.py
#27175scipy.sparse.*array
insklearn/manifold/tests/test_isomap.py
#27341scipy.sparse.*array
insklearn\model_selection\tests\test_search.py
#27326scipy.sparse.*array
insklearn/utils/tests/test_mocking.py
#27319scipy.sparse.*array
inmodel_selection/tests/test_validation.py
#27366scipy.sparse/*array
insklearn/neighbors/tests/test_neighbors
#27250scipy.sparse.*array
insklearn/tests/test_kernel_approximation.py
#27301scipy.sparse.*array
intest_pairwise.py
#27288scipy.sparse.*array
insklearn/datasets/tests/test_svmlight_format.py
#27220scipy.sparse.*array
insklearn/covariance/tests/test_graphical_lasso.py
#27494scipy.sparse.*array
intest_polynomial.py
#27166scipy.sparse.*array
insklearn/metrics/tests/test_common.py
#27205scipy.sparse.*array
insklearn/preprocessing/tests/test_common.py
#27164scipy.sparse.*array
insklearn/cluster/tests/test_k_means.py
#27179scipy.sparse.*array
insklearn/cluster/tests/test_optics.py
#27104scipy.sparse.*array
insklearn/utils/tests/test_estimator_checks.py
#27203scipy.sparse.*array
insklearn/utils/tests/test_shortest_path.py
#27502scipy.sparse.*array
insklearn/utils/tests/test_seq_dataset.py
#27413scipy.sparse/*array
insklearn/manifold/tests/test_spectral_embedding
#27240scipy.sparse.*array
insklearn/tests/test_random_projection.py
#27314scipy.sparse.*array
insklearn/svm/tests/test_sparse
#27723scipy.sparse.*array
insklearn/cluster/tests/test_spectral.py
#27161scipy.sparse.*array
insklearn/utils/_testing.py
#278472. Perform the following (non-exhaustive) changes for
<filename>
*_matrix
(for instance see eda7b16)scipy.sparse.*array
#27090 (comment)):3. Create a pull request
4. Once the pull request is created
The text was updated successfully, but these errors were encountered: