diff --git a/ci/test_wheel.sh b/ci/test_wheel.sh index 47ad8e0b1b..a0adddc6b7 100755 --- a/ci/test_wheel.sh +++ b/ci/test_wheel.sh @@ -15,30 +15,29 @@ fi # echo to expand wildcard before adding `[extra]` requires for pip python -m pip install $(echo ./dist/cuml*.whl)[test] +RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"} +mkdir -p "${RAPIDS_TESTS_DIR}" + EXITCODE=0 trap "EXITCODE=1" ERR set +e -# Run smoke tests for aarch64 pull requests -if [[ "$(arch)" == "aarch64" && "${RAPIDS_BUILD_TYPE}" == "pull-request" ]]; then - python ci/wheel_smoke_test_cuml.py -else - rapids-logger "pytest cuml single GPU" - ./ci/run_cuml_singlegpu_pytests.sh \ - --numprocesses=8 \ - --dist=worksteal \ - -k 'not test_sparse_pca_inputs and not test_fil_skl_classification' \ - --junitxml="${RAPIDS_TESTS_DIR}/junit-cuml.xml" - - # Run test_sparse_pca_inputs separately - ./ci/run_cuml_singlegpu_pytests.sh \ - -k 'test_sparse_pca_inputs' \ - --junitxml="${RAPIDS_TESTS_DIR}/junit-cuml-sparse-pca.xml" - - rapids-logger "pytest cuml-dask" - ./ci/run_cuml_dask_pytests.sh \ - --junitxml="${RAPIDS_TESTS_DIR}/junit-cuml-dask.xml" -fi + +rapids-logger "pytest cuml single GPU" +./ci/run_cuml_singlegpu_pytests.sh \ + --numprocesses=8 \ + --dist=worksteal \ + -k 'not test_sparse_pca_inputs and not test_fil_skl_classification' \ + --junitxml="${RAPIDS_TESTS_DIR}/junit-cuml.xml" + +# Run test_sparse_pca_inputs separately +./ci/run_cuml_singlegpu_pytests.sh \ + -k 'test_sparse_pca_inputs' \ + --junitxml="${RAPIDS_TESTS_DIR}/junit-cuml-sparse-pca.xml" + +rapids-logger "pytest cuml-dask" +./ci/run_cuml_dask_pytests.sh \ + --junitxml="${RAPIDS_TESTS_DIR}/junit-cuml-dask.xml" rapids-logger "Test script exiting with value: $EXITCODE" exit ${EXITCODE} diff --git a/ci/wheel_smoke_test_cuml.py b/ci/wheel_smoke_test_cuml.py deleted file mode 100644 index aa935639ae..0000000000 --- a/ci/wheel_smoke_test_cuml.py +++ /dev/null @@ -1,26 +0,0 @@ -""" -A simple test for cuML based on scikit-learn. - -Adapted from xgboost: -https://raw.githubusercontent.com/rapidsai/xgboost-conda/branch-23.02/recipes/xgboost/test-py-xgboost.py -""" -from cuml.ensemble import RandomForestClassifier -import sklearn.datasets -import sklearn.model_selection -import sklearn.metrics - -X, y = sklearn.datasets.load_iris(return_X_y=True) -Xtrn, Xtst, ytrn, ytst = sklearn.model_selection.train_test_split( - X, y, train_size=0.8, random_state=4) - -clf = RandomForestClassifier( - max_depth=2, - n_estimators=10, - n_bins=32, - accuracy_metric="multi:softmax") -clf.fit(Xtrn, ytrn) -ypred = clf.predict(Xtst) -acc = sklearn.metrics.accuracy_score(ytst, ypred) - -print('cuml RandomForestClassifier accuracy on iris:', acc) -assert acc > 0.9