Skip to content

Commit

Permalink
Replace TODO notes with pytest.skip
Browse files Browse the repository at this point in the history
  • Loading branch information
Vika-F committed Sep 25, 2024
1 parent dd31d96 commit 9fc80a2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions onedal/svm/tests/test_csr_svm.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ def _test_diabetes(queue, kernel):

@pass_if_not_implemented_for_gpu(reason="csr svm is not implemented")
@pytest.mark.parametrize("queue", get_queues())
# TODO: investigate failures in kernel="sigmoid" after migration to oneMKL
# @pytest.mark.parametrize("kernel", ["linear", "rbf", "poly", "sigmoid"])
@pytest.mark.parametrize("kernel", ["linear", "rbf", "poly"])
@pytest.mark.parametrize("kernel", ["linear", "rbf", "poly", "sigmoid"])
def test_diabetes(queue, kernel):
if kernel == "sigmoid":
pytest.skip("Sparse sigmoid kernel function is buggy.")
_test_diabetes(queue, kernel)


Expand Down
6 changes: 3 additions & 3 deletions onedal/svm/tests/test_nusvr.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ def _test_diabetes_compare_with_sklearn(queue, kernel):

@pass_if_not_implemented_for_gpu(reason="nusvr is not implemented")
@pytest.mark.parametrize("queue", get_queues())
# TODO: investigate failures in kernel="sigmoid" after migration to oneMKL
# @pytest.mark.parametrize("kernel", ["linear", "rbf", "poly", "sigmoid"])
@pytest.mark.parametrize("kernel", ["linear", "rbf", "poly"])
@pytest.mark.parametrize("kernel", ["linear", "rbf", "poly", "sigmoid"])
def test_diabetes_compare_with_sklearn(queue, kernel):
if kernel == "sigmoid":
pytest.skip("Sparse sigmoid kernel function is buggy.")
_test_diabetes_compare_with_sklearn(queue, kernel)


Expand Down
6 changes: 3 additions & 3 deletions onedal/svm/tests/test_svr.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ def _test_diabetes_compare_with_sklearn(queue, kernel):

@pass_if_not_implemented_for_gpu(reason="svr is not implemented")
@pytest.mark.parametrize("queue", get_queues())
# TODO: investigate failures in kernel="sigmoid" after migration to oneMKL
# @pytest.mark.parametrize("kernel", ["linear", "rbf", "poly", "sigmoid"])
@pytest.mark.parametrize("kernel", ["linear", "rbf", "poly"])
@pytest.mark.parametrize("kernel", ["linear", "rbf", "poly", "sigmoid"])
def test_diabetes_compare_with_sklearn(queue, kernel):
if kernel == "sigmoid":
pytest.skip("Sparse sigmoid kernel function is buggy.")
_test_diabetes_compare_with_sklearn(queue, kernel)


Expand Down
7 changes: 4 additions & 3 deletions sklearnex/cluster/tests/test_kmeans.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,17 @@ def test_results_on_dense_gold_data(dataframe, queue, algorithm):
reason="Sparse data requires oneDAL>=2024.7.0",
)
@pytest.mark.parametrize("queue", get_queues())
# TODO: investigate failures in init="random" after migration to oneMKL
# @pytest.mark.parametrize("init", ["k-means++", "random", "arraylike"])
@pytest.mark.parametrize("init", ["k-means++", "arraylike"])
@pytest.mark.parametrize("init", ["k-means++", "random", "arraylike"])
@pytest.mark.parametrize("algorithm", ["lloyd", "elkan"])
@pytest.mark.parametrize(
"dims", [(1000, 10, 0.95, 3), (50000, 100, 0.75, 10), (10000, 10, 0.8, 5)]
)
def test_dense_vs_sparse(queue, init, algorithm, dims):
from sklearnex.cluster import KMeans

if init == "random":
pytest.skip("random initialization in sparse K-means is buggy.")

# For higher level of sparsity (smaller density) the test may fail
n_samples, n_features, density, n_clusters = dims
X_dense = generate_dense_dataset(n_samples, n_features, density, n_clusters)
Expand Down

0 comments on commit 9fc80a2

Please sign in to comment.