From 4c5208ea7cbb7504f69ea337daa0db0677eb0c7c Mon Sep 17 00:00:00 2001 From: Dante Gama Dessavre Date: Tue, 15 Feb 2022 13:30:22 -0600 Subject: [PATCH 1/2] FIX Use CUDA_REL variable in gpu build.sh script --- ci/gpu/build.sh | 2 +- python/cuml/test/test_nearest_neighbors.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 683a48c5ff..c1948d89f1 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -200,7 +200,7 @@ else # FIXME: Project FLASH only builds for python version 3.8 which is the one used in # the CUDA 11.0 job, need to change all versions to project flash - if [ "$PYTHON" == "3.8" ];then + if [ "$CUDA_REL" == "11.0" ];then gpuci_logger "Using Project FLASH to install cuml python" CONDA_FILE=`find ${CONDA_ARTIFACT_PATH} -name "cuml*.tar.bz2"` CONDA_FILE=`basename "$CONDA_FILE" .tar.bz2` #get filename without extension diff --git a/python/cuml/test/test_nearest_neighbors.py b/python/cuml/test/test_nearest_neighbors.py index dfc8711711..fc08a6ed59 100644 --- a/python/cuml/test/test_nearest_neighbors.py +++ b/python/cuml/test/test_nearest_neighbors.py @@ -553,8 +553,8 @@ def test_nearest_neighbors_rbc(distance, n_neighbors, nrows): # TODO: These are failing with 1 or 2 mismatched elements # for very small values of k: # https://github.com/rapidsai/cuml/issues/4262 - assert len(brute_d[brute_d != rbc_d]) <= 3 - assert len(brute_i[brute_i != rbc_i]) <= 3 + assert len(brute_d[brute_d != rbc_d]) <= 5 + assert len(brute_i[brute_i != rbc_i]) <= 5 @pytest.mark.parametrize("metric", valid_metrics_sparse()) From 7683fc03e7621f99ef466fda85eb982fc9b3dfda Mon Sep 17 00:00:00 2001 From: Dante Gama Dessavre Date: Tue, 15 Feb 2022 17:59:45 -0600 Subject: [PATCH 2/2] FIX Remove treshold of mismatched elemnts of rbc test --- python/cuml/test/test_nearest_neighbors.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/python/cuml/test/test_nearest_neighbors.py b/python/cuml/test/test_nearest_neighbors.py index fc08a6ed59..acbb7dfb1d 100644 --- a/python/cuml/test/test_nearest_neighbors.py +++ b/python/cuml/test/test_nearest_neighbors.py @@ -547,14 +547,8 @@ def test_nearest_neighbors_rbc(distance, n_neighbors, nrows): brute_d, brute_i = knn_cu_brute.kneighbors( X[:query_rows, :], n_neighbors=n_neighbors) - rbc_i = cp.sort(rbc_i, axis=1) - brute_i = cp.sort(brute_i, axis=1) - - # TODO: These are failing with 1 or 2 mismatched elements - # for very small values of k: - # https://github.com/rapidsai/cuml/issues/4262 - assert len(brute_d[brute_d != rbc_d]) <= 5 - assert len(brute_i[brute_i != rbc_i]) <= 5 + assert len(brute_d[brute_d != rbc_d]) == 0 + assert len(brute_i[brute_i != rbc_i]) == 0 @pytest.mark.parametrize("metric", valid_metrics_sparse())