-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Add test-gpu
task
#6217
Add test-gpu
task
#6217
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6217 +/- ##
==========================================
- Coverage 88.21% 88.18% -0.04%
==========================================
Files 321 321
Lines 67289 67360 +71
==========================================
+ Hits 59361 59402 +41
- Misses 7928 7958 +30 ☔ View full report in Codecov by Sentry. |
holoviews/element/selection.py
Outdated
if isinstance(xvals, cudf.Series): | ||
xvals = xvals.values.astype('float') | ||
yvals = yvals.values.astype('float') | ||
try: | ||
import cuspatial | ||
result = cuspatial.point_in_polygon( | ||
result = cuspatial.point_in_polygon( # TODO: now only takes two arguments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AjayThorve, can you help me get cuspatial
up and running if you have time?
I get this error TypeError: point_in_polygon() takes 2 positional arguments but 6 were given
when running the test. I assume this has worked at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @hoxbro. yes there have been some changes in the point_in_polygon api, it only takes two parameters now, both cuspatial GeoSeries (points, polygons). Here is something that might work:
import cudf
import cupy as cp
from shapely.geometry import Polygon
import geopandas
if isinstance(xvals, cudf.Series):
xvals = xvals.values.astype('float')
yvals = yvals.values.astype('float')
try:
import cuspatial
df = cudf.DataFrame({'x':xvals, 'y':yvals})
points = cuspatial.GeoSeries.from_points_xy(
df.interleave_columns().astype('float')
)
polygons = cuspatial.GeoSeries(
geopandas.GeoSeries(Polygon(geometry)), index=["selection"]
)
result = cuspatial.point_in_polygon(points.polygon)
return result.selection
ref:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much! Worked like a charm.
Do you have a version of when the changes were made?
This should make it easier to test CuDF (locally). I'm using it as a marker as I only want to be able to run the GPU tests if this task is called.
I have used the versions from https://github.com/rapidsai/cudf?tab=readme-ov-file#conda