benchmarks: cupy branch in get_xr_dataarray never raises NotImplementedError on non-GPU hosts
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- performance
Research direction
Open benchmarks/benchmarks/common.py and inspect get_xr_dataarray, comparing the older cupy branch with the dask+cupy branch from #3706. Confirm the non-CUDA path invokes the availability check before importing cupy and raises NotImplementedError, then run the most practical available guard-behavior check.
Written by the indexing model from the issue text.
Description
benchmarks/benchmarks/common.py gates the cupy branch with if not has_cuda_and_cupy: — but has_cuda_and_cupy is a function, so the expression is always false and the guard never fires. On a host without CUDA the branch falls through to import cupy and the benchmark dies with ImportError instead of being skipped via NotImplementedError.
The dask+cupy branch added in #3706 calls the function correctly; this fixes the older branch to match. One-line change plus whatever guard-behavior check is practical without a GPU-less CI lane.
Spotted during the #3706 review; kept out of that PR to leave the diff scoped.
- Dominant language
- Python
- Stars
- 972
- Forks
- 92
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from xarray-contrib/xarray-spatial
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
xarray-contrib/xarray-spatial#3726 ·
-
api area:surface bug severity:medium sweep-api-consistency
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
xarray-contrib/xarray-spatial#3712 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
xarray-contrib/xarray-spatial#3710 ·
-
area:surface documentation user-guide-example
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
xarray-contrib/xarray-spatial#3464 ·
-
area:analysis documentation user-guide-example
Difficulty 2/5 Half a day Newbie friendliness 78/100
xarray-contrib/xarray-spatial#3463 ·
All issues in xarray-contrib/xarray-spatial
Similar issues
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100