Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TEST] Test cuSpatial with artifacts from rapidsai/rmm#1095 #1294

Closed
5 changes: 5 additions & 0 deletions ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ source rapids-env-update

export CMAKE_GENERATOR=Ninja

LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1095 cpp)
LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14365 cpp)

rapids-print-env

version=$(rapids-generate-version)

rapids-logger "Begin cpp build"

RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
--channel "${LIBRMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
conda/recipes/libcuspatial

rapids-upload-conda-to-s3 cpp
9 changes: 9 additions & 0 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,18 @@ rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)

LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1095 cpp)
RMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1095 python)
LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14365 cpp)
CUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14365 python)

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
libcuspatial \
cuspatial \
cuproj
Expand Down
15 changes: 14 additions & 1 deletion ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,28 @@ version=$(rapids-generate-version)
commit=$(git rev-parse HEAD)

echo "${version}" > VERSION
for package_name in cuspatial cuproj; do
for package_name in cuspatial cuproj; do
sed -i "/^__git_commit__/ s/= .*/= \"${commit}\"/g" "${package_dir}/${package_name}/${package_name}/_version.py"
done

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)

LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1095 cpp)
RMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1095 python)
LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14365 cpp)
CUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14365 python)

rapids-logger "Begin py build cuSpatial"

# TODO: Remove `--no-test` flag once importing on a CPU
# node works correctly
RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
conda/recipes/cuspatial

rapids-logger "Begin py build cuProj"
Expand All @@ -37,6 +46,10 @@ rapids-logger "Begin py build cuProj"
RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
conda/recipes/cuproj

rapids-upload-conda-to-s3 python
10 changes: 10 additions & 0 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ conda activate test
set -u

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)

LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1095 cpp)
RMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1095 python)
LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14365 cpp)
CUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14365 python)

RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/
mkdir -p "${RAPIDS_TESTS_DIR}"

Expand All @@ -29,6 +35,10 @@ rapids-print-env

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
libcuspatial libcuspatial-tests

rapids-logger "Check GPU usage"
Expand Down
9 changes: 9 additions & 0 deletions ci/test_notebooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,18 @@ rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)

LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1095 cpp)
RMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1095 python)
LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14365 cpp)
CUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14365 python)

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
cuspatial libcuspatial cuproj

NBTEST="$(realpath "$(dirname "$0")/utils/nbtest.sh")"
Expand Down
9 changes: 9 additions & 0 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)

LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1095 cpp)
RMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1095 python)
LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14365 cpp)
CUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14365 python)

RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}
RAPIDS_COVERAGE_DIR=${RAPIDS_COVERAGE_DIR:-"${PWD}/coverage-results"}
mkdir -p "${RAPIDS_TESTS_DIR}" "${RAPIDS_COVERAGE_DIR}"
Expand All @@ -34,6 +39,10 @@ rapids-print-env
rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
libcuspatial cuspatial cuproj

rapids-logger "Check GPU usage"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def _test_hausdorff_from_list_of_spaces(spaces):
def test_empty():
actual = _test_hausdorff_from_list_of_spaces([])

expected = cudf.DataFrame([])
expected = cudf.DataFrame([], columns=cudf.Index([]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely an upstream cuDF change made the empty Dataframe uses a RangeIndex as the column names, instead of cudf.Index. Since semantically both represent empty column names, I simply change the gold result here to let tests pass.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK thanks. Sounds like once everything is passing we will need to update this PR to remove the CI changes and get this fix merged in?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's right, otherwise we might have to handle this at release time.


cudf.testing.assert_frame_equal(expected, actual)

Expand Down