Skip to content

Commit 7c715c4

Browse files
authored
Further fixes for Scipy 1.15 update for PR and nightly CI (#6213)
Nightly CI revealed a bug between hypothesis `floating_dtypes(sizes=(32, 64)` and building sparse matrices, this PR uses `st.sampled_from((np.float32, np.float64)` to solve the issue. Additionally, cudf.pandas active made one dataset in ARIMA pytests fail, so disabling that one while we look further into it. Authors: - Dante Gama Dessavre (https://github.com/dantegd) Approvers: - Victor Lafargue (https://github.com/viclafargue) - Simon Adorf (https://github.com/csadorf) URL: #6213
1 parent bfd2e22 commit 7c715c4

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

python/cuml/cuml/tests/test_arima.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@
3636
from cuml.internals.safe_imports import gpu_only_import
3737
import statsmodels.api as sm
3838
from sklearn.model_selection import train_test_split
39-
from cuml.internals.safe_imports import cpu_only_import_from
39+
from cuml.internals.safe_imports import (
40+
cpu_only_import_from,
41+
gpu_only_import_from,
42+
)
4043
import warnings
4144
import os
4245
import pytest
@@ -49,6 +52,7 @@
4952
approx_fprime = cpu_only_import_from("scipy.optimize", "approx_fprime")
5053

5154
cudf = gpu_only_import("cudf")
55+
cudf_pandas_active = gpu_only_import_from("cudf.pandas", "LOADED")
5256

5357

5458
###############################################################################
@@ -410,6 +414,11 @@ def fill_interpolation(df_in):
410414
@pytest.mark.parametrize("dtype", [np.float64])
411415
def test_integration(key, data, dtype):
412416
"""Full integration test: estimate, fit, forecast"""
417+
if (
418+
data.dataset == "endog_hourly_earnings_by_industry_missing_exog"
419+
and cudf_pandas_active
420+
):
421+
pytest.skip(reason="https://github.com/rapidsai/cuml/issues/6209")
413422
order, seasonal_order, intercept = extract_order(key)
414423
s = max(1, seasonal_order[3])
415424

python/cuml/cuml/tests/test_linear_model.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
1+
# Copyright (c) 2019-2025, NVIDIA CORPORATION.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -629,7 +629,7 @@ def test_logistic_regression_model_default(dtype):
629629

630630

631631
@given(
632-
dtype=floating_dtypes(sizes=(32, 64)),
632+
dtype=st.sampled_from((np.float32, np.float64)),
633633
order=st.sampled_from(("C", "F")),
634634
sparse_input=st.booleans(),
635635
fit_intercept=st.booleans(),
@@ -661,7 +661,7 @@ def test_logistic_regression_model_digits(
661661
assert score >= acceptable_score
662662

663663

664-
@given(dtype=floating_dtypes(sizes=(32, 64)))
664+
@given(dtype=st.sampled_from((np.float32, np.float64)))
665665
def test_logistic_regression_sparse_only(dtype, nlp_20news):
666666

667667
# sklearn score with max_iter = 10000
@@ -685,7 +685,7 @@ def test_logistic_regression_sparse_only(dtype, nlp_20news):
685685
@given(
686686
dataset=split_datasets(
687687
standard_classification_datasets(
688-
dtypes=floating_dtypes(sizes=(32, 64)),
688+
dtypes=st.sampled_from((np.float32, np.float64)),
689689
n_classes=st.sampled_from((2, 10)),
690690
n_features=st.just(20),
691691
n_informative=st.just(10),
@@ -727,7 +727,7 @@ def test_logistic_regression_decision_function(
727727
@given(
728728
dataset=split_datasets(
729729
standard_classification_datasets(
730-
dtypes=floating_dtypes(sizes=(32, 64)),
730+
dtypes=st.sampled_from((np.float32, np.float64)),
731731
n_classes=st.sampled_from((2, 10)),
732732
n_features=st.just(20),
733733
n_informative=st.just(10),

0 commit comments

Comments
 (0)