WIP: pylibcugraph: declare cupy and numpy hard dependencies #4854
+35
−75
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.
While testing stuff for #4804, I found that
pylibcugraph
has a hard runtime dependency oncupy
andnumpy
, but isn't declaring themNotes for Reviewers
Evidence that
pylibcugraph
already has a hard dependency on these librariesThey're used unconditionally here:
cugraph/python/pylibcugraph/pylibcugraph/utils.pyx
Lines 19 to 20 in cddd69e
But have import guards in other places:
cugraph/python/pylibcugraph/pylibcugraph/sssp.pyx
Lines 127 to 139 in cddd69e
So this PR doesn't introduce new hard dependencies... it just makes them explicit, to make it easier to install and run
pylibcugraph
.How was this not caught in CI?
Import tests aren't run here for conda packages, because conda builds happen on CPU-only nodes.
cugraph/ci/build_python.sh
Lines 27 to 30 in cddd69e
And
numpy
andcupy
are probably getting pulled in by some of the wheels' test dependencies, likecudf
, here:cugraph/ci/test_wheel.sh
Line 17 in cddd69e
Should we just make the other unconditional cases conditional with try-catching?
No. Talked with @rlratzel, @ChuckHastings, and @eriknw offline, and we agreed to declare these as hard runtime dependencies (and remove the try-catching in places that had it).