rapidsai / deployment

RAPIDS Deployment Documentation
https://docs.rapids.ai/deployment/stable/
9 stars 28 forks source link

Use of cuspatial in examples is outdated #325

Closed hcho3 closed 7 months ago

hcho3 commented 7 months ago

The use of the Haversine distance from cuSpatial is no longer up to date in examples rapids-ec2-mnmg and rapids-autoscaling-multi-tenant-kubernetes.

cuspatial.haversine_distance(
        df["pickup_longitude"],
        df["pickup_latitude"],
        df["dropoff_longitude"],
        df["dropoff_latitude"],
    )

should be updated to

    pickup = cuspatial.GeoSeries.from_points_xy(
        part[["pickup_longitude", "pickup_latitude"]].interleave_columns()
    )
    dropoff = cuspatial.GeoSeries.from_points_xy(
        part[["dropoff_longitude", "dropoff_latitude"]].interleave_columns()
    )
    res = cuspatial.haversine_distance(pickup, dropoff)
    res.index = part.index
    return res

to use the latest API.

jacobtomlinson commented 7 months ago

Fixed by #336 and #329