Test vegetation_roughness ndvi on dask+cupy backend#3497
Merged
Conversation
The ndvi dask+cupy dispatch path (_veg_roughness_ndvi_dask_cupy) was registered but never exercised by a test: nlcd ran on all four backends, but ndvi only ran on numpy, cupy, and dask. Add a numpy-vs-dask+cupy equivalence test so the path is covered. GPU-validated locally; full test_flood.py is 89 passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a missing backend-coverage test for
xrspatial.flood.vegetation_roughness.The
mode='ndvi'path on the dask+cupy backend(
_veg_roughness_ndvi_dask_cupy) was dispatched but never invoked by anytest. The
mode='nlcd'path ran on all four backends, and ndvi ran onnumpy, cupy, and dask, leaving ndvi+dask+cupy as the one untested cell in
the matrix.
TestVegRoughnessDaskCuPy::test_ndvi_numpy_equals_dask_cupymirrors theexisting nlcd dask+cupy test and asserts numpy-vs-dask+cupy equivalence
(including NaN propagation).
Verification
GPU-validated locally (CUDA available). New test passes; full
test_flood.pyis 89 passed.This is test-only; no source changes. No bug was surfaced.
Found by the test-coverage deep-sweep.