Skip to content
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

[HOTFIX] Updates cudf usage for compatibility with cudf>=23.10.1 #4007

Closed
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ jobs:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected]
with:
node_type: cpu32
extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY
build_command: |
sccache -z;
build-all --verbose;
build-all --verbose -j$(nproc --ignore=1);
sccache -s;
2 changes: 1 addition & 1 deletion ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rapids-mamba-retry install \
--channel "${PYTHON_CHANNEL}" \
libcugraph \
pylibcugraph \
cugraph \
"${PYTHON_CHANNEL}"::cugraph \
galipremsagar marked this conversation as resolved.
Show resolved Hide resolved
nx-cugraph \
cugraph-service-server \
cugraph-service-client
Expand Down
5 changes: 5 additions & 0 deletions ci/test_wheel_nx-cugraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@

set -eoxu pipefail

# Download the pylibcugraph built in the previous step
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-pylibcugraph-dep
python -m pip install --no-deps ./local-pylibcugraph-dep/pylibcugraph*.whl

./ci/test_wheel.sh nx-cugraph python/nx-cugraph
24 changes: 6 additions & 18 deletions python/cugraph/cugraph/structure/property_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,15 +800,9 @@ def add_vertex_data(
tmp_df.index = tmp_df.index.rename(self.vertex_col_name)

# FIXME: handle case of a type_name column already being in tmp_df
if self.__series_type is cudf.Series:
# cudf does not yet support initialization with a scalar
tmp_df[TCN] = cudf.Series(
cudf.Series([type_name], dtype=cat_dtype).repeat(len(tmp_df)),
index=tmp_df.index,
)
else:
# pandas is oddly slow if dtype is passed to the constructor here
tmp_df[TCN] = pd.Series(type_name, index=tmp_df.index).astype(cat_dtype)
tmp_df[TCN] = self.__series_type(type_name, index=tmp_df.index).astype(
cat_dtype
)

if property_columns:
# all columns
Expand Down Expand Up @@ -1207,15 +1201,9 @@ def add_edge_data(
tmp_df[self.src_col_name] = tmp_df[vertex_col_names[0]]
tmp_df[self.dst_col_name] = tmp_df[vertex_col_names[1]]

if self.__series_type is cudf.Series:
# cudf does not yet support initialization with a scalar
tmp_df[TCN] = cudf.Series(
cudf.Series([type_name], dtype=cat_dtype).repeat(len(tmp_df)),
index=tmp_df.index,
)
else:
# pandas is oddly slow if dtype is passed to the constructor here
tmp_df[TCN] = pd.Series(type_name, index=tmp_df.index).astype(cat_dtype)
tmp_df[TCN] = self.__series_type(type_name, index=tmp_df.index).astype(
cat_dtype
)

# Add unique edge IDs to the new rows. This is just a count for each
# row starting from the last edge ID value, with initial edge ID 0.
Expand Down
Loading