From 6b4c34d879a1b7660f7608a24b0fff76ab971ec9 Mon Sep 17 00:00:00 2001 From: Peter Andreas Entschev Date: Tue, 13 Jul 2021 14:03:51 -0700 Subject: [PATCH 1/2] Treat Deprecation/Future warnings as errors This will allow us to know about and resolve Dask deprecation cycles more quickly. --- ci/gpu/build.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 76cb65091..bbf5c8562 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -106,7 +106,7 @@ else gpuci_logger "Python pytest for dask-cuda" cd "$WORKSPACE" ls dask_cuda/tests/ - UCXPY_IFNAME=eth0 UCX_WARN_UNUSED_ENV_VARS=n UCX_MEMTYPE_CACHE=n pytest -vs --cache-clear --basetemp="$WORKSPACE/dask-cuda-tmp" --junitxml="$WORKSPACE/junit-dask-cuda.xml" --cov-config=.coveragerc --cov=dask_cuda --cov-report=xml:"$WORKSPACE/dask-cuda-coverage.xml" --cov-report term dask_cuda/tests/ + UCXPY_IFNAME=eth0 UCX_WARN_UNUSED_ENV_VARS=n UCX_MEMTYPE_CACHE=n pytest -vs -Werror::DeprecationWarning -Werror::FutureWarning --cache-clear --basetemp="$WORKSPACE/dask-cuda-tmp" --junitxml="$WORKSPACE/junit-dask-cuda.xml" --cov-config=.coveragerc --cov=dask_cuda --cov-report=xml:"$WORKSPACE/dask-cuda-coverage.xml" --cov-report term dask_cuda/tests/ gpuci_logger "Running dask.distributed GPU tests" # Test downstream packages, which requires Python v3.7 @@ -117,12 +117,12 @@ else git clone https://github.com/dask/distributed gpuci_logger "Run Distributed Tests" - pytest --cache-clear -vs distributed/distributed/protocol/tests/test_cupy.py - pytest --cache-clear -vs distributed/distributed/protocol/tests/test_numba.py - pytest --cache-clear -vs distributed/distributed/protocol/tests/test_rmm.py - pytest --cache-clear -vs distributed/distributed/protocol/tests/test_collection_cuda.py - pytest --cache-clear -vs distributed/distributed/tests/test_nanny.py - pytest --cache-clear -vs distributed/distributed/diagnostics/tests/test_nvml.py + pytest --cache-clear -vs -Werror::DeprecationWarning -Werror::FutureWarning distributed/distributed/protocol/tests/test_cupy.py + pytest --cache-clear -vs -Werror::DeprecationWarning -Werror::FutureWarning distributed/distributed/protocol/tests/test_numba.py + pytest --cache-clear -vs -Werror::DeprecationWarning -Werror::FutureWarning distributed/distributed/protocol/tests/test_rmm.py + pytest --cache-clear -vs -Werror::DeprecationWarning -Werror::FutureWarning distributed/distributed/protocol/tests/test_collection_cuda.py + pytest --cache-clear -vs -Werror::DeprecationWarning -Werror::FutureWarning distributed/distributed/tests/test_nanny.py + pytest --cache-clear -vs -Werror::DeprecationWarning -Werror::FutureWarning distributed/distributed/diagnostics/tests/test_nvml.py fi logger "Run local benchmark..." From 47bec3858b8769a230da4d23d7015f2a17e2dcb3 Mon Sep 17 00:00:00 2001 From: Peter Andreas Entschev Date: Tue, 13 Jul 2021 14:05:36 -0700 Subject: [PATCH 2/2] Fix np.bool warning --- dask_cuda/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dask_cuda/utils.py b/dask_cuda/utils.py index 9c6c4dcff..b34b357d7 100644 --- a/dask_cuda/utils.py +++ b/dask_cuda/utils.py @@ -109,7 +109,7 @@ def unpack_bitmask(x, mask_bits=64): bytestr = np.frombuffer( bytes(np.binary_repr(mask, width=mask_bits), "utf-8"), "u1" ) - mask = np.flip(bytestr - ord("0")).astype(np.bool) + mask = np.flip(bytestr - ord("0")).astype(bool) unpacked_mask = np.where( mask, np.arange(mask_bits) + cpu_offset, np.full(mask_bits, -1) )