From 498b8a10ef60f3dadcffd610619cba55f4a3684b Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Tue, 16 Apr 2024 16:06:44 -0700 Subject: [PATCH 1/7] add debug printout --- cpp/tests/link_analysis/hits_test.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpp/tests/link_analysis/hits_test.cpp b/cpp/tests/link_analysis/hits_test.cpp index ad82dc3a1d1..1a3852fc1b8 100644 --- a/cpp/tests/link_analysis/hits_test.cpp +++ b/cpp/tests/link_analysis/hits_test.cpp @@ -262,6 +262,12 @@ class Tests_Hits : public ::testing::TestWithParam + std::max(std::max(lhs, rhs) * threshold_ratio, threshold_magnitude)) { // DEBUG + std::cout << "lhs=" << lhs << " rhs=" << rhs << " abs(lhs - rhs)=" << std::abs(lhs - rhs) + << " threshold_ratio=" << threshold_ratio + << " threshold_magnitude=" << threshold_magnitude << std::endl; + } return std::abs(lhs - rhs) <= std::max(std::max(lhs, rhs) * threshold_ratio, threshold_magnitude); }; From 4333981facf7465e8b03d3e2b75fcdea2c928600 Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Tue, 16 Apr 2024 16:20:35 -0700 Subject: [PATCH 2/7] update pr.yaml for testing --- .github/workflows/pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index c04e0e879d2..9b1202d382f 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -50,7 +50,7 @@ jobs: conda-cpp-tests: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.06 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@use-new-runners with: build_type: pull-request conda-cpp-checks: From a556d394ca8814c7e9d8cdc15fb15e429e867288 Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Tue, 16 Apr 2024 18:05:11 -0700 Subject: [PATCH 3/7] loosen threshold in comparing floating point numbers --- cpp/tests/link_analysis/hits_test.cpp | 8 +------- cpp/tests/link_analysis/mg_hits_test.cpp | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/cpp/tests/link_analysis/hits_test.cpp b/cpp/tests/link_analysis/hits_test.cpp index 1a3852fc1b8..d15a55d5b97 100644 --- a/cpp/tests/link_analysis/hits_test.cpp +++ b/cpp/tests/link_analysis/hits_test.cpp @@ -260,14 +260,8 @@ class Tests_Hits : public ::testing::TestWithParam - std::max(std::max(lhs, rhs) * threshold_ratio, threshold_magnitude)) { // DEBUG - std::cout << "lhs=" << lhs << " rhs=" << rhs << " abs(lhs - rhs)=" << std::abs(lhs - rhs) - << " threshold_ratio=" << threshold_ratio - << " threshold_magnitude=" << threshold_magnitude << std::endl; - } return std::abs(lhs - rhs) <= std::max(std::max(lhs, rhs) * threshold_ratio, threshold_magnitude); }; diff --git a/cpp/tests/link_analysis/mg_hits_test.cpp b/cpp/tests/link_analysis/mg_hits_test.cpp index cc835e099c7..21836aab84f 100644 --- a/cpp/tests/link_analysis/mg_hits_test.cpp +++ b/cpp/tests/link_analysis/mg_hits_test.cpp @@ -219,7 +219,7 @@ class Tests_MGHits : public ::testing::TestWithParam Date: Tue, 16 Apr 2024 23:01:23 -0700 Subject: [PATCH 4/7] re-enable debug print --- cpp/tests/link_analysis/hits_test.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpp/tests/link_analysis/hits_test.cpp b/cpp/tests/link_analysis/hits_test.cpp index d15a55d5b97..089baac3fdb 100644 --- a/cpp/tests/link_analysis/hits_test.cpp +++ b/cpp/tests/link_analysis/hits_test.cpp @@ -262,6 +262,12 @@ class Tests_Hits : public ::testing::TestWithParam + std::max(std::max(lhs, rhs) * threshold_ratio, threshold_magnitude)) { // DEBUG + std::cout << "lhs=" << lhs << " rhs=" << rhs << " abs(lhs - rhs)=" << std::abs(lhs - rhs) + << " threshold_ratio=" << threshold_ratio + << " threshold_magnitude=" << threshold_magnitude << std::endl; + } return std::abs(lhs - rhs) <= std::max(std::max(lhs, rhs) * threshold_ratio, threshold_magnitude); }; From 8d40ad32cebd1d1375b7d01051492b5276ca35d5 Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Tue, 16 Apr 2024 23:54:21 -0700 Subject: [PATCH 5/7] loosen threshold in comparing floating point numbers --- cpp/tests/link_analysis/mg_hits_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/tests/link_analysis/mg_hits_test.cpp b/cpp/tests/link_analysis/mg_hits_test.cpp index 21836aab84f..011fa627e23 100644 --- a/cpp/tests/link_analysis/mg_hits_test.cpp +++ b/cpp/tests/link_analysis/mg_hits_test.cpp @@ -217,7 +217,7 @@ class Tests_MGHits : public ::testing::TestWithParam Date: Wed, 17 Apr 2024 00:45:13 -0700 Subject: [PATCH 6/7] adjust threshold --- cpp/tests/link_analysis/hits_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/tests/link_analysis/hits_test.cpp b/cpp/tests/link_analysis/hits_test.cpp index 089baac3fdb..32c9dc90b14 100644 --- a/cpp/tests/link_analysis/hits_test.cpp +++ b/cpp/tests/link_analysis/hits_test.cpp @@ -258,7 +258,7 @@ class Tests_Hits : public ::testing::TestWithParam Date: Wed, 17 Apr 2024 08:49:02 -0700 Subject: [PATCH 7/7] remove temporary debug code --- .github/workflows/pr.yaml | 2 +- cpp/tests/link_analysis/hits_test.cpp | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 9b1202d382f..c04e0e879d2 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -50,7 +50,7 @@ jobs: conda-cpp-tests: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@use-new-runners + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.06 with: build_type: pull-request conda-cpp-checks: diff --git a/cpp/tests/link_analysis/hits_test.cpp b/cpp/tests/link_analysis/hits_test.cpp index 32c9dc90b14..081bf043296 100644 --- a/cpp/tests/link_analysis/hits_test.cpp +++ b/cpp/tests/link_analysis/hits_test.cpp @@ -262,12 +262,6 @@ class Tests_Hits : public ::testing::TestWithParam - std::max(std::max(lhs, rhs) * threshold_ratio, threshold_magnitude)) { // DEBUG - std::cout << "lhs=" << lhs << " rhs=" << rhs << " abs(lhs - rhs)=" << std::abs(lhs - rhs) - << " threshold_ratio=" << threshold_ratio - << " threshold_magnitude=" << threshold_magnitude << std::endl; - } return std::abs(lhs - rhs) <= std::max(std::max(lhs, rhs) * threshold_ratio, threshold_magnitude); };