From 74b5c95e287bdfa7d62d526f4976e6a1e7cef6ad Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 21 Oct 2024 11:00:32 -0500 Subject: [PATCH 01/18] add PR CI for cugraph-pyg and cugraph-dgl --- ci/build_python.sh | 14 +++++ ci/run_cugraph_dgl_pytests.sh | 2 +- ci/test_wheel.sh | 7 ++- ci/test_wheel_cugraph-dgl.sh | 45 ++++++---------- ci/test_wheel_cugraph-pyg.sh | 54 +++++++++---------- conda/recipes/cugraph-dgl/meta.yaml | 8 +-- .../cugraph-pyg/conda_build_config.yaml | 2 +- conda/recipes/cugraph-pyg/meta.yaml | 7 +-- .../conda/cugraph_dgl_dev_cuda-118.yaml | 9 ++-- python/cugraph-dgl/cugraph_dgl/_version.py | 19 ++++--- .../cugraph_dgl/tests/test_version.py | 12 +++++ python/cugraph-dgl/pyproject.toml | 11 +++- .../conda/cugraph_pyg_dev_cuda-118.yaml | 7 ++- .../cugraph_pyg/tests/test_version.py | 12 +++++ python/cugraph-pyg/pyproject.toml | 10 ++++ 15 files changed, 132 insertions(+), 87 deletions(-) create mode 100644 python/cugraph-dgl/cugraph_dgl/tests/test_version.py create mode 100644 python/cugraph-pyg/cugraph_pyg/tests/test_version.py diff --git a/ci/build_python.sh b/ci/build_python.sh index 49d3c126..1ce96dd1 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -25,4 +25,18 @@ RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --channel "${CPP_CHANNEL}" \ conda/recipes/pylibwholegraph +RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}" + +rapids-conda-retry mambabuild \ + --no-test \ + --channel "${CPP_CHANNEL}" \ + --channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \ + conda/recipes/cugraph-pyg + +rapids-conda-retry mambabuild \ + --no-test \ + --channel "${CPP_CHANNEL}" \ + --channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \ + conda/recipes/cugraph-dgl + rapids-upload-conda-to-s3 python diff --git a/ci/run_cugraph_dgl_pytests.sh b/ci/run_cugraph_dgl_pytests.sh index 83c26a57..e85eb04e 100755 --- a/ci/run_cugraph_dgl_pytests.sh +++ b/ci/run_cugraph_dgl_pytests.sh @@ -4,6 +4,6 @@ set -euo pipefail # Support invoking run_cugraph_dgl_pytests.sh outside the script directory -cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/cugraph-dgl/tests +cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/cugraph-dgl/cugraph_dgl pytest --cache-clear --ignore=mg "$@" . diff --git a/ci/test_wheel.sh b/ci/test_wheel.sh index 39d2c1f7..38dad935 100755 --- a/ci/test_wheel.sh +++ b/ci/test_wheel.sh @@ -4,7 +4,6 @@ set -eoxu pipefail package_name=$1 -package_dir=$2 python_package_name=$(echo ${package_name}|sed 's/-/_/g') @@ -12,9 +11,9 @@ mkdir -p ./dist RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist -# use 'ls' to expand wildcard before adding `[extra]` requires for pip -# pip creates wheels using python package names -python -m pip install $(ls ./dist/${python_package_name}*.whl)[test] +# echo to expand wildcard before adding `[extra]` requires for pip +python -m pip install \ + "$(echo ./dist/${python_package_name}*.whl)[test]" # Run smoke tests for aarch64 pull requests arch=$(uname -m) diff --git a/ci/test_wheel_cugraph-dgl.sh b/ci/test_wheel_cugraph-dgl.sh index 564b46cb..d709145c 100755 --- a/ci/test_wheel_cugraph-dgl.sh +++ b/ci/test_wheel_cugraph-dgl.sh @@ -4,24 +4,15 @@ set -eoxu pipefail package_name="cugraph-dgl" -package_dir="python/cugraph-dgl" - -python_package_name=$(echo ${package_name}|sed 's/-/_/g') mkdir -p ./dist RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" -# Download wheels built during this job. -RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-deps -RAPIDS_PY_WHEEL_NAME="cugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-deps -python -m pip install ./local-deps/*.whl - -# use 'ls' to expand wildcard before adding `[extra]` requires for pip +# Download the pylibwholegraph and cugraph-dgl built in the previous step +RAPIDS_PY_WHEEL_NAME="pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-deps RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-download-wheels-from-s3 ./dist -# pip creates wheels using python package names -python -m pip install $(ls ./dist/${python_package_name}*.whl)[test] - +# determine pytorch and DGL sources PKG_CUDA_VER="$(echo ${CUDA_VERSION} | cut -d '.' -f1,2 | tr -d '.')" PKG_CUDA_VER_MAJOR=${PKG_CUDA_VER:0:2} if [[ "${PKG_CUDA_VER_MAJOR}" == "12" ]]; then @@ -30,20 +21,16 @@ else PYTORCH_CUDA_VER=$PKG_CUDA_VER fi PYTORCH_URL="https://download.pytorch.org/whl/cu${PYTORCH_CUDA_VER}" -DGL_URL="https://data.dgl.ai/wheels/cu${PYTORCH_CUDA_VER}/repo.html" - -# Starting from 2.2, PyTorch wheels depend on nvidia-nccl-cuxx>=2.19 wheel and -# dynamically link to NCCL. RAPIDS CUDA 11 CI images have an older NCCL version that -# might shadow the newer NCCL required by PyTorch during import (when importing -# `cupy` before `torch`). -if [[ "${NCCL_VERSION}" < "2.19" ]]; then - PYTORCH_VER="2.1.0" -else - PYTORCH_VER="2.3.0" -fi - -rapids-logger "Installing PyTorch and DGL" -rapids-retry python -m pip install "torch==${PYTORCH_VER}" --index-url ${PYTORCH_URL} -rapids-retry python -m pip install dgl==2.0.0 --find-links ${DGL_URL} - -python -m pytest python/cugraph-dgl/tests +DGL_URL="https://data.dgl.ai/wheels/torch-2.3/cu${PYTORCH_CUDA_VER}/repo.html" + +# echo to expand wildcard before adding `[extra]` requires for pip +python -m pip install \ + -v \ + --extra-index-url "${PYTORCH_URL}" \ + --find-links "${DGL_URL}" \ + "$(echo ./local-deps/pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}*.whl)" \ + "$(echo ./dist/cugraph_dgl_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]" \ + 'dgl==2.4.0' \ + 'torch>=2.3.0,<2.4' + +python -m pytest python/cugraph-dgl/cugraph_dgl/tests diff --git a/ci/test_wheel_cugraph-pyg.sh b/ci/test_wheel_cugraph-pyg.sh index 1004063c..3a4bf5f3 100755 --- a/ci/test_wheel_cugraph-pyg.sh +++ b/ci/test_wheel_cugraph-pyg.sh @@ -4,46 +4,42 @@ set -eoxu pipefail package_name="cugraph-pyg" -package_dir="python/cugraph-pyg" - -python_package_name=$(echo ${package_name}|sed 's/-/_/g') mkdir -p ./dist RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" -# Download wheels built during this job. -RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-deps -RAPIDS_PY_WHEEL_NAME="cugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-deps -python -m pip install ./local-deps/*.whl - -# use 'ls' to expand wildcard before adding `[extra]` requires for pip +# Download the pylibwholegraph and cugraph-pyg built in the previous step +RAPIDS_PY_WHEEL_NAME="pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-deps RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-download-wheels-from-s3 ./dist -# pip creates wheels using python package names -python -m pip install $(ls ./dist/${python_package_name}*.whl)[test] - -# RAPIDS_DATASET_ROOT_DIR is used by test scripts -export RAPIDS_DATASET_ROOT_DIR="$(realpath datasets)" - -# Used to skip certain examples in CI due to memory limitations -export CI_RUN=1 +# determine pytorch and pyg sources if [[ "${CUDA_VERSION}" == "11.8.0" ]]; then PYTORCH_URL="https://download.pytorch.org/whl/cu118" - PYG_URL="https://data.pyg.org/whl/torch-2.1.0+cu118.html" + PYG_URL="https://data.pyg.org/whl/torch-2.3.0+cu118.html" else PYTORCH_URL="https://download.pytorch.org/whl/cu121" - PYG_URL="https://data.pyg.org/whl/torch-2.1.0+cu121.html" + PYG_URL="https://data.pyg.org/whl/torch-2.3.0+cu121.html" fi -rapids-logger "Installing PyTorch and PyG dependencies" -rapids-retry python -m pip install torch==2.1.0 --index-url ${PYTORCH_URL} -rapids-retry python -m pip install "torch-geometric>=2.5,<2.6" -rapids-retry python -m pip install \ - ogb \ - pyg_lib \ - torch_scatter \ - torch_sparse \ - tensordict \ - -f ${PYG_URL} + +# echo to expand wildcard before adding `[extra]` requires for pip +python -m pip install \ + -v \ + --extra-index-url "${PYTORCH_URL}" \ + --find-links "${PYG_URL}" \ + "$(echo ./local-deps/pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}*.whl)" \ + "$(echo ./dist/cugraph_pyg_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]" \ + 'ogb' \ + 'pyg_lib' \ + 'torch>=2.3.0,<2.4' \ + 'torch-geometric>=2.5,<2.6' \ + 'torch_scatter' \ + 'torch_sparse' + +# RAPIDS_DATASET_ROOT_DIR is used by test scripts +export RAPIDS_DATASET_ROOT_DIR="$(realpath datasets)" + +# Used to skip certain examples in CI due to memory limitations +export CI_RUN=1 rapids-logger "pytest cugraph-pyg (single GPU)" pushd python/cugraph-pyg/cugraph_pyg diff --git a/conda/recipes/cugraph-dgl/meta.yaml b/conda/recipes/cugraph-dgl/meta.yaml index 3c900753..f08c831a 100644 --- a/conda/recipes/cugraph-dgl/meta.yaml +++ b/conda/recipes/cugraph-dgl/meta.yaml @@ -21,15 +21,17 @@ build: requirements: host: - python + - rapids-build-backend>=0.3.1,<0.4.0.dev0 + - setuptools>=61.0.0 run: - cugraph ={{ version }} - - dgl >=1.1.0.cu* + - dgl >=2.4.0.th23.cu* - numba >=0.57 - numpy >=1.23,<3.0a0 - pylibcugraphops ={{ minor_version }} - tensordict >=0.1.2 - python - - pytorch >=2.0 + - pytorch >=2.3,<2.4.0a0 - cupy >=12.0.0 tests: @@ -41,4 +43,4 @@ about: dev_url: https://github.com/rapidsai/cugraph license: Apache-2.0 license_file: ../../../LICENSE - summary: cuGraph library + summary: cuGraph-dgl library diff --git a/conda/recipes/cugraph-pyg/conda_build_config.yaml b/conda/recipes/cugraph-pyg/conda_build_config.yaml index 2d7aff18..47d98b48 100644 --- a/conda/recipes/cugraph-pyg/conda_build_config.yaml +++ b/conda/recipes/cugraph-pyg/conda_build_config.yaml @@ -10,7 +10,7 @@ cuda_compiler: - nvcc cmake_version: - - ">=3.26.4" + - ">=3.26.4,!=3.30.0" c_stdlib: - sysroot diff --git a/conda/recipes/cugraph-pyg/meta.yaml b/conda/recipes/cugraph-pyg/meta.yaml index 5bce7805..7d3e503e 100644 --- a/conda/recipes/cugraph-pyg/meta.yaml +++ b/conda/recipes/cugraph-pyg/meta.yaml @@ -24,18 +24,19 @@ requirements: host: - cython >=3.0.0 - python - - scikit-build-core >=0.7.0 + - rapids-build-backend>=0.3.1,<0.4.0.dev0 + - setuptools>=61.0.0 run: - rapids-dask-dependency ={{ minor_version }} - numba >=0.57 - numpy >=1.23,<3.0a0 - python - - pytorch >=2.0 + - pytorch >=2.3,<2.4.0a0 - cupy >=12.0.0 - cugraph ={{ version }} - pylibcugraphops ={{ minor_version }} - tensordict >=0.1.2 - - pyg >=2.5,<2.6 + - pytorch_geometric >=2.5,<2.6 tests: imports: diff --git a/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml b/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml index 9f0070f8..632157fe 100644 --- a/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml +++ b/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml @@ -9,8 +9,8 @@ channels: - nvidia dependencies: - cugraph==24.12.*,>=0.0.0a0 -- dgl>=1.1.0.cu* -- dglteam/label/th21_cu118::dgl +- dgl>=2.4.0.cu* +- dglteam/label/th23_cu118::dgl - pandas - pre-commit - pydantic @@ -18,10 +18,9 @@ dependencies: - pytest - pytest-benchmark - pytest-cov +- pytest-forked - pytest-xdist -- pytorch-cuda=11.8 -- pytorch::pytorch>=2.0 -- pytorch::pytorch>=2.0,<2.4.0a0 +- pytorch::pytorch>=2.3,<2.4.0a0 - tensordict>=0.1.2 - torchdata name: cugraph_dgl_dev_cuda-118 diff --git a/python/cugraph-dgl/cugraph_dgl/_version.py b/python/cugraph-dgl/cugraph_dgl/_version.py index f2210fdf..e8adcc31 100644 --- a/python/cugraph-dgl/cugraph_dgl/_version.py +++ b/python/cugraph-dgl/cugraph_dgl/_version.py @@ -15,12 +15,17 @@ import importlib.resources -# Read VERSION file from the module that is symlinked to VERSION file -# in the root of the repo at build time or copied to the moudle at -# installation. VERSION is a separate file that allows CI build-time scripts -# to update version info (including commit hashes) without modifying -# source files. __version__ = ( - importlib.resources.files("cugraph_dgl").joinpath("VERSION").read_text().strip() + importlib.resources.files(__package__).joinpath("VERSION").read_text().strip() ) -__git_commit__ = "" +try: + __git_commit__ = ( + importlib.resources.files(__package__) + .joinpath("GIT_COMMIT") + .read_text() + .strip() + ) +except FileNotFoundError: + __git_commit__ = "" + +__all__ = ["__git_commit__", "__version__"] diff --git a/python/cugraph-dgl/cugraph_dgl/tests/test_version.py b/python/cugraph-dgl/cugraph_dgl/tests/test_version.py new file mode 100644 index 00000000..343e4fb2 --- /dev/null +++ b/python/cugraph-dgl/cugraph_dgl/tests/test_version.py @@ -0,0 +1,12 @@ +# Copyright (c) 2024, NVIDIA CORPORATION. + +import cugraph_dgl + + +def test_version_constants_are_populated(): + # __git_commit__ will only be non-empty in a built distribution + assert isinstance(cugraph_dgl.__git_commit__, str) + + # __version__ should always be non-empty + assert isinstance(cugraph_dgl.__version__, str) + assert len(cugraph_dgl.__version__) > 0 diff --git a/python/cugraph-dgl/pyproject.toml b/python/cugraph-dgl/pyproject.toml index 0ca636d1..1718ed38 100644 --- a/python/cugraph-dgl/pyproject.toml +++ b/python/cugraph-dgl/pyproject.toml @@ -6,8 +6,9 @@ requires = [ "cmake>=3.26.4,!=3.30.0", "cython>=3.0.0", "ninja", + "rapids-build-backend>=0.3.1,<0.4.0.dev0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. -build-backend = "setuptools.build_meta" +build-backend = "rapids_build_backend.build" [project] name = "cugraph-dgl" @@ -37,7 +38,10 @@ test = [ "pytest", "pytest-benchmark", "pytest-cov", + "pytest-forked", "pytest-xdist", + "tensordict>=0.1.2", + "torch>=2.3,<2.4.0a0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. [project.urls] @@ -54,3 +58,8 @@ version = {file = "cugraph_dgl/VERSION"} include = [ "cugraph_dgl*", ] + +[tool.rapids-build-backend] +build-backend = "setuptools.build_meta" +dependencies-file = "../../dependencies.yaml" +matrix-entry = "cuda_suffixed=true" diff --git a/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml b/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml index a9f520c8..5609cb55 100644 --- a/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml +++ b/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml @@ -12,15 +12,14 @@ dependencies: - pandas - pre-commit - pydantic -- pyg>=2.5,<2.6 - pylibcugraphops==24.12.*,>=0.0.0a0 - pytest - pytest-benchmark - pytest-cov +- pytest-forked - pytest-xdist -- pytorch-cuda=11.8 -- pytorch::pytorch>=2.0 -- pytorch::pytorch>=2.0,<2.4.0a0 +- pytorch::pytorch>=2.3,<2.4.0a0 +- pytorch_geometric>=2.5,<2.6 - tensordict>=0.1.2 - torchdata name: cugraph_pyg_dev_cuda-118 diff --git a/python/cugraph-pyg/cugraph_pyg/tests/test_version.py b/python/cugraph-pyg/cugraph_pyg/tests/test_version.py new file mode 100644 index 00000000..4ea0f987 --- /dev/null +++ b/python/cugraph-pyg/cugraph_pyg/tests/test_version.py @@ -0,0 +1,12 @@ +# Copyright (c) 2024, NVIDIA CORPORATION. + +import cugraph_pyg + + +def test_version_constants_are_populated(): + # __git_commit__ will only be non-empty in a built distribution + assert isinstance(cugraph_pyg.__git_commit__, str) + + # __version__ should always be non-empty + assert isinstance(cugraph_pyg.__version__, str) + assert len(cugraph_pyg.__version__) > 0 diff --git a/python/cugraph-pyg/pyproject.toml b/python/cugraph-pyg/pyproject.toml index d0bfe58f..872e3776 100644 --- a/python/cugraph-pyg/pyproject.toml +++ b/python/cugraph-pyg/pyproject.toml @@ -6,7 +6,9 @@ requires = [ "cmake>=3.26.4,!=3.30.0", "cython>=3.0.0", "ninja", + "rapids-build-backend>=0.3.1,<0.4.0.dev0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. +build-backend = "rapids_build_backend.build" [tool.pytest.ini_options] testpaths = ["cugraph_pyg/tests"] @@ -45,7 +47,10 @@ test = [ "pytest", "pytest-benchmark", "pytest-cov", + "pytest-forked", "pytest-xdist", + "tensordict>=0.1.2", + "torch>=2.3,<2.4.0a0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. [tool.setuptools] @@ -59,3 +64,8 @@ include = [ "cugraph_pyg*", "cugraph_pyg.*", ] + +[tool.rapids-build-backend] +build-backend = "setuptools.build_meta" +dependencies-file = "../../dependencies.yaml" +matrix-entry = "cuda_suffixed=true" From 8b803383792eb0ea8303b43d825191e13b37608a Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 21 Oct 2024 11:08:43 -0500 Subject: [PATCH 02/18] remove some duplication in dependencies.yaml --- dependencies.yaml | 16 ++++------------ .../conda/cugraph_dgl_dev_cuda-118.yaml | 8 ++++---- python/cugraph-dgl/pyproject.toml | 4 ---- .../conda/cugraph_pyg_dev_cuda-118.yaml | 6 +++--- python/cugraph-pyg/pyproject.toml | 4 ---- 5 files changed, 11 insertions(+), 27 deletions(-) diff --git a/dependencies.yaml b/dependencies.yaml index e0e74d22..93a354a2 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -114,8 +114,9 @@ files: extras: table: project includes: - - python_run_cugraph_dgl + - depends_on_cugraph - depends_on_pylibcugraphops + - python_run_cugraph_dgl py_test_cugraph_dgl: output: pyproject pyproject_dir: python/cugraph-dgl @@ -139,8 +140,9 @@ files: extras: table: project includes: - - python_run_cugraph_pyg + - depends_on_cugraph - depends_on_pylibcugraphops + - python_run_cugraph_pyg py_test_cugraph_pyg: output: pyproject pyproject_dir: python/cugraph-pyg @@ -323,18 +325,12 @@ dependencies: packages: - &numba numba>=0.57 - *numpy - - output_types: [pyproject] - packages: - - &cugraph cugraph==24.12.*,>=0.0.0a0 python_run_cugraph_pyg: common: - output_types: [conda, pyproject] packages: - *numba - *numpy - - output_types: [pyproject] - packages: - - *cugraph rapids_build_skbuild: common: - output_types: [conda, requirements, pyproject] @@ -389,16 +385,12 @@ dependencies: common: - output_types: [conda] packages: - - cugraph==24.12.*,>=0.0.0a0 - - pytorch::pytorch>=2.0 - dgl>=1.1.0.cu* - &tensordict tensordict>=0.1.2 cugraph_pyg_dev: common: - output_types: [conda] packages: - - cugraph==24.12.*,>=0.0.0a0 - - pytorch::pytorch>=2.0 - *tensordict - pyg>=2.5,<2.6 diff --git a/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml b/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml index 632157fe..f6490bd0 100644 --- a/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml +++ b/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml @@ -9,8 +9,8 @@ channels: - nvidia dependencies: - cugraph==24.12.*,>=0.0.0a0 -- dgl>=2.4.0.cu* -- dglteam/label/th23_cu118::dgl +- dgl>=1.1.0.cu* +- dglteam/label/th21_cu118::dgl - pandas - pre-commit - pydantic @@ -18,9 +18,9 @@ dependencies: - pytest - pytest-benchmark - pytest-cov -- pytest-forked - pytest-xdist -- pytorch::pytorch>=2.3,<2.4.0a0 +- pytorch-cuda=11.8 +- pytorch::pytorch>=2.0,<2.4.0a0 - tensordict>=0.1.2 - torchdata name: cugraph_dgl_dev_cuda-118 diff --git a/python/cugraph-dgl/pyproject.toml b/python/cugraph-dgl/pyproject.toml index 1718ed38..e252837b 100644 --- a/python/cugraph-dgl/pyproject.toml +++ b/python/cugraph-dgl/pyproject.toml @@ -6,7 +6,6 @@ requires = [ "cmake>=3.26.4,!=3.30.0", "cython>=3.0.0", "ninja", - "rapids-build-backend>=0.3.1,<0.4.0.dev0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. build-backend = "rapids_build_backend.build" @@ -38,10 +37,7 @@ test = [ "pytest", "pytest-benchmark", "pytest-cov", - "pytest-forked", "pytest-xdist", - "tensordict>=0.1.2", - "torch>=2.3,<2.4.0a0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. [project.urls] diff --git a/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml b/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml index 5609cb55..1297d073 100644 --- a/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml +++ b/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml @@ -12,14 +12,14 @@ dependencies: - pandas - pre-commit - pydantic +- pyg>=2.5,<2.6 - pylibcugraphops==24.12.*,>=0.0.0a0 - pytest - pytest-benchmark - pytest-cov -- pytest-forked - pytest-xdist -- pytorch::pytorch>=2.3,<2.4.0a0 -- pytorch_geometric>=2.5,<2.6 +- pytorch-cuda=11.8 +- pytorch::pytorch>=2.0,<2.4.0a0 - tensordict>=0.1.2 - torchdata name: cugraph_pyg_dev_cuda-118 diff --git a/python/cugraph-pyg/pyproject.toml b/python/cugraph-pyg/pyproject.toml index 872e3776..405262fb 100644 --- a/python/cugraph-pyg/pyproject.toml +++ b/python/cugraph-pyg/pyproject.toml @@ -6,7 +6,6 @@ requires = [ "cmake>=3.26.4,!=3.30.0", "cython>=3.0.0", "ninja", - "rapids-build-backend>=0.3.1,<0.4.0.dev0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. build-backend = "rapids_build_backend.build" @@ -47,10 +46,7 @@ test = [ "pytest", "pytest-benchmark", "pytest-cov", - "pytest-forked", "pytest-xdist", - "tensordict>=0.1.2", - "torch>=2.3,<2.4.0a0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. [tool.setuptools] From fb5e9e0ad8bd35f2b3a62544e6a688d61772ab6f Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 21 Oct 2024 11:33:27 -0500 Subject: [PATCH 03/18] fix env for conda builds, stopping have builds depend on tests --- .github/workflows/pr.yaml | 74 +++++++++++++++++++++++++++++---------- ci/build_python.sh | 6 ++-- 2 files changed, 57 insertions(+), 23 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 8628d460..efc9b1ab 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -15,11 +15,15 @@ jobs: - changed-files - checks - conda-cpp-build - - conda-cpp-tests + # - conda-cpp-tests - conda-python-build - - conda-python-tests + # - conda-python-tests - wheel-build-pylibwholegraph - - wheel-tests-pylibwholegraph + # - wheel-tests-pylibwholegraph + - wheel-build-cugraph-dgl + - wheel-tests-cugraph-dgl + - wheel-build-cugraph-pyg + - wheel-tests-cugraph-pyg secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.12 if: always() @@ -67,40 +71,72 @@ jobs: with: build_type: pull-request node_type: cpu32 - conda-cpp-tests: - needs: [conda-cpp-build, changed-files] - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.12 - if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp - with: - build_type: pull-request + # conda-cpp-tests: + # needs: [conda-cpp-build, changed-files] + # secrets: inherit + # uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.12 + # if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp + # with: + # build_type: pull-request conda-python-build: needs: conda-cpp-build secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12 with: build_type: pull-request - conda-python-tests: - needs: [conda-python-build, changed-files] + # conda-python-tests: + # needs: [conda-python-build, changed-files] + # secrets: inherit + # uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12 + # if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python + # with: + # build_type: pull-request + wheel-build-pylibwholegraph: + needs: checks secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12 + with: + build_type: pull-request + script: ci/build_wheel_pylibwholegraph.sh + node_type: cpu32 + # wheel-tests-pylibwholegraph: + # needs: [wheel-build-pylibwholegraph, changed-files] + # secrets: inherit + # uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12 + # if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python + # with: + # build_type: pull-request + # script: ci/test_wheel_pylibwholegraph.sh + # matrix_filter: map(select(.ARCH == "amd64")) + wheel-build-cugraph-dgl: + needs: checks + secrets: inherit + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12 + with: + build_type: pull-request + script: ci/build_wheel_cugraph-dgl.sh + wheel-tests-cugraph-dgl: + needs: [wheel-build-pylibwholegraph, wheel-build-cugraph-dgl, changed-files] + secrets: inherit + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12 if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python with: build_type: pull-request - wheel-build-pylibwholegraph: + script: ci/test_wheel_cugraph-dgl.sh + matrix_filter: map(select(.ARCH == "amd64")) + wheel-build-cugraph-pyg: needs: checks secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12 with: build_type: pull-request - script: ci/build_wheel_pylibwholegraph.sh - node_type: cpu32 - wheel-tests-pylibwholegraph: - needs: [wheel-build-pylibwholegraph, changed-files] + script: ci/build_wheel_cugraph-pyg.sh + wheel-tests-cugraph-pyg: + needs: [wheel-build-pylibwholegraph, wheel-build-cugraph-pyg, changed-files] secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12 if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python with: build_type: pull-request - script: ci/test_wheel_pylibwholegraph.sh + script: ci/test_wheel_cugraph-pyg.sh matrix_filter: map(select(.ARCH == "amd64")) diff --git a/ci/build_python.sh b/ci/build_python.sh index 1ce96dd1..9f42948b 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -25,15 +25,13 @@ RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --channel "${CPP_CHANNEL}" \ conda/recipes/pylibwholegraph -RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}" - -rapids-conda-retry mambabuild \ +RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --no-test \ --channel "${CPP_CHANNEL}" \ --channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \ conda/recipes/cugraph-pyg -rapids-conda-retry mambabuild \ +RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --no-test \ --channel "${CPP_CHANNEL}" \ --channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \ From 84fccbc14b5f50b26862cb8e9f795834c45ba686 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 21 Oct 2024 11:56:48 -0500 Subject: [PATCH 04/18] fix wheel metadata --- .github/workflows/pr.yaml | 16 +++++----- ci/test_wheel_cugraph-dgl.sh | 10 ++++-- ci/test_wheel_cugraph-pyg.sh | 8 +++-- .../all_cuda-118_arch-x86_64.yaml | 3 ++ .../all_cuda-121_arch-x86_64.yaml | 3 ++ .../all_cuda-124_arch-x86_64.yaml | 3 ++ dependencies.yaml | 32 ++++++++----------- python/cugraph-dgl/pyproject.toml | 6 ++-- python/cugraph-pyg/pyproject.toml | 6 ++-- 9 files changed, 50 insertions(+), 37 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index efc9b1ab..ea2db9e0 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -17,7 +17,7 @@ jobs: - conda-cpp-build # - conda-cpp-tests - conda-python-build - # - conda-python-tests + - conda-python-tests - wheel-build-pylibwholegraph # - wheel-tests-pylibwholegraph - wheel-build-cugraph-dgl @@ -84,13 +84,13 @@ jobs: uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12 with: build_type: pull-request - # conda-python-tests: - # needs: [conda-python-build, changed-files] - # secrets: inherit - # uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12 - # if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python - # with: - # build_type: pull-request + conda-python-tests: + needs: [conda-python-build, changed-files] + secrets: inherit + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12 + if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python + with: + build_type: pull-request wheel-build-pylibwholegraph: needs: checks secrets: inherit diff --git a/ci/test_wheel_cugraph-dgl.sh b/ci/test_wheel_cugraph-dgl.sh index d709145c..07db3b2b 100755 --- a/ci/test_wheel_cugraph-dgl.sh +++ b/ci/test_wheel_cugraph-dgl.sh @@ -26,11 +26,15 @@ DGL_URL="https://data.dgl.ai/wheels/torch-2.3/cu${PYTORCH_CUDA_VER}/repo.html" # echo to expand wildcard before adding `[extra]` requires for pip python -m pip install \ -v \ - --extra-index-url "${PYTORCH_URL}" \ --find-links "${DGL_URL}" \ "$(echo ./local-deps/pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}*.whl)" \ "$(echo ./dist/cugraph_dgl_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]" \ - 'dgl==2.4.0' \ - 'torch>=2.3.0,<2.4' + 'dgl==2.4.0' + +# install torch separately, to be sure we get a CUDA build +python -m pip install \ + --index-url "${PYTORCH_URL}" \ + -v \ + 'torch>=2.0,<2.4.0a0' python -m pytest python/cugraph-dgl/cugraph_dgl/tests diff --git a/ci/test_wheel_cugraph-pyg.sh b/ci/test_wheel_cugraph-pyg.sh index 3a4bf5f3..dd9c9f30 100755 --- a/ci/test_wheel_cugraph-pyg.sh +++ b/ci/test_wheel_cugraph-pyg.sh @@ -24,17 +24,21 @@ fi # echo to expand wildcard before adding `[extra]` requires for pip python -m pip install \ -v \ - --extra-index-url "${PYTORCH_URL}" \ --find-links "${PYG_URL}" \ "$(echo ./local-deps/pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}*.whl)" \ "$(echo ./dist/cugraph_pyg_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]" \ 'ogb' \ 'pyg_lib' \ - 'torch>=2.3.0,<2.4' \ 'torch-geometric>=2.5,<2.6' \ 'torch_scatter' \ 'torch_sparse' +# install torch separately, to be sure we get a CUDA build +python -m pip install \ + --index-url "${PYTORCH_URL}" \ + -v \ + 'torch>=2.0,<2.4.0a0' + # RAPIDS_DATASET_ROOT_DIR is used by test scripts export RAPIDS_DATASET_ROOT_DIR="$(realpath datasets)" diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 6383b574..2ab91029 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -44,14 +44,17 @@ dependencies: - pytorch-cuda=11.8 - pytorch::pytorch>=2.0,<2.4.0a0 - raft-dask==24.12.*,>=0.0.0a0 +- rapids-build-backend>=0.3.0,<0.4.0.dev0 - recommonmark - rmm==24.12.*,>=0.0.0a0 - scikit-build-core>=0.10.0 - scipy +- setuptools>=61.0.0 - sphinx-copybutton - sphinx-markdown-tables - sphinx<6 - sphinxcontrib-websupport - torchdata - wget +- wheel name: all_cuda-118_arch-x86_64 diff --git a/conda/environments/all_cuda-121_arch-x86_64.yaml b/conda/environments/all_cuda-121_arch-x86_64.yaml index 7429b0d6..d7f796d4 100644 --- a/conda/environments/all_cuda-121_arch-x86_64.yaml +++ b/conda/environments/all_cuda-121_arch-x86_64.yaml @@ -49,14 +49,17 @@ dependencies: - pytorch-cuda=12.1 - pytorch::pytorch>=2.0,<2.4.0a0 - raft-dask==24.12.*,>=0.0.0a0 +- rapids-build-backend>=0.3.0,<0.4.0.dev0 - recommonmark - rmm==24.12.*,>=0.0.0a0 - scikit-build-core>=0.10.0 - scipy +- setuptools>=61.0.0 - sphinx-copybutton - sphinx-markdown-tables - sphinx<6 - sphinxcontrib-websupport - torchdata - wget +- wheel name: all_cuda-121_arch-x86_64 diff --git a/conda/environments/all_cuda-124_arch-x86_64.yaml b/conda/environments/all_cuda-124_arch-x86_64.yaml index 08c0ee6d..b17d547a 100644 --- a/conda/environments/all_cuda-124_arch-x86_64.yaml +++ b/conda/environments/all_cuda-124_arch-x86_64.yaml @@ -49,14 +49,17 @@ dependencies: - pytorch-cuda=12.1 - pytorch::pytorch>=2.0,<2.4.0a0 - raft-dask==24.12.*,>=0.0.0a0 +- rapids-build-backend>=0.3.0,<0.4.0.dev0 - recommonmark - rmm==24.12.*,>=0.0.0a0 - scikit-build-core>=0.10.0 - scipy +- setuptools>=61.0.0 - sphinx-copybutton - sphinx-markdown-tables - sphinx<6 - sphinxcontrib-websupport - torchdata - wget +- wheel name: all_cuda-124_arch-x86_64 diff --git a/dependencies.yaml b/dependencies.yaml index 93a354a2..e6f39f34 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -13,7 +13,6 @@ files: - cuda - cuda_version - docs - - python_build_wheel - python_build_cythonize - depends_on_rmm - depends_on_cugraph @@ -28,6 +27,8 @@ files: - depends_on_pyg - python_run_cugraph_dgl - python_run_cugraph_pyg + - rapids_build_setuptools + - rapids_build_skbuild - test_cpp - test_notebook - test_python_common @@ -83,7 +84,8 @@ files: table: tool.rapids-build-backend key: requires includes: - - python_build_wheel + - common_build + - python_build_cythonize py_run_pylibwholegraph: output: pyproject pyproject_dir: python/pylibwholegraph @@ -107,7 +109,7 @@ files: extras: table: build-system includes: - - python_build_wheel + - rapids_build_setuptools py_run_cugraph_dgl: output: pyproject pyproject_dir: python/cugraph-dgl @@ -133,7 +135,7 @@ files: extras: table: build-system includes: - - python_build_wheel + - rapids_build_setuptools py_run_cugraph_pyg: output: pyproject pyproject_dir: python/cugraph-pyg @@ -296,24 +298,11 @@ dependencies: - matrix: packages: - python>=3.10,<3.13 - python_build_wheel: - common: - - output_types: [conda, pyproject, requirements] - packages: - - cmake>=3.26.4,!=3.30.0 - - cython>=3.0.0 - - ninja python_build_cythonize: common: - output_types: [conda, pyproject, requirements] packages: - cython>=3.0.0 - - output_types: conda - packages: - - scikit-build-core>=0.10.0 - - output_types: [pyproject, requirements] - packages: - - scikit-build-core[pyproject]>=0.10.0 python_run_pylibwholegraph: common: - output_types: [conda, pyproject, requirements] @@ -335,13 +324,20 @@ dependencies: common: - output_types: [conda, requirements, pyproject] packages: - - rapids-build-backend>=0.3.0,<0.4.0.dev0 + - &rapids_build_backend rapids-build-backend>=0.3.0,<0.4.0.dev0 - output_types: conda packages: - scikit-build-core>=0.10.0 - output_types: [requirements, pyproject] packages: - scikit-build-core[pyproject]>=0.10.0 + rapids_build_setuptools: + common: + - output_types: [conda, requirements, pyproject] + packages: + - *rapids_build_backend + - setuptools>=61.0.0 + - wheel test_cpp: common: - output_types: conda diff --git a/python/cugraph-dgl/pyproject.toml b/python/cugraph-dgl/pyproject.toml index e252837b..8b2e84e3 100644 --- a/python/cugraph-dgl/pyproject.toml +++ b/python/cugraph-dgl/pyproject.toml @@ -3,9 +3,9 @@ [build-system] requires = [ - "cmake>=3.26.4,!=3.30.0", - "cython>=3.0.0", - "ninja", + "rapids-build-backend>=0.3.0,<0.4.0.dev0", + "setuptools>=61.0.0", + "wheel", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. build-backend = "rapids_build_backend.build" diff --git a/python/cugraph-pyg/pyproject.toml b/python/cugraph-pyg/pyproject.toml index 405262fb..30ac81e5 100644 --- a/python/cugraph-pyg/pyproject.toml +++ b/python/cugraph-pyg/pyproject.toml @@ -3,9 +3,9 @@ [build-system] requires = [ - "cmake>=3.26.4,!=3.30.0", - "cython>=3.0.0", - "ninja", + "rapids-build-backend>=0.3.0,<0.4.0.dev0", + "setuptools>=61.0.0", + "wheel", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. build-backend = "rapids_build_backend.build" From 74ecbe5d396493fc06de3322b7fac2a8d4260a70 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 21 Oct 2024 12:44:08 -0500 Subject: [PATCH 05/18] cugraph-pyg and cugraph-dgl have runtime dependencies on pandas... they should express them --- conda/recipes/cugraph-dgl/meta.yaml | 1 + conda/recipes/cugraph-pyg/meta.yaml | 1 + dependencies.yaml | 21 +++---------------- .../conda/cugraph_dgl_dev_cuda-118.yaml | 1 - python/cugraph-dgl/pyproject.toml | 3 ++- .../conda/cugraph_pyg_dev_cuda-118.yaml | 1 - python/cugraph-pyg/pyproject.toml | 2 +- 7 files changed, 8 insertions(+), 22 deletions(-) diff --git a/conda/recipes/cugraph-dgl/meta.yaml b/conda/recipes/cugraph-dgl/meta.yaml index f08c831a..34e826e5 100644 --- a/conda/recipes/cugraph-dgl/meta.yaml +++ b/conda/recipes/cugraph-dgl/meta.yaml @@ -28,6 +28,7 @@ requirements: - dgl >=2.4.0.th23.cu* - numba >=0.57 - numpy >=1.23,<3.0a0 + - pandas - pylibcugraphops ={{ minor_version }} - tensordict >=0.1.2 - python diff --git a/conda/recipes/cugraph-pyg/meta.yaml b/conda/recipes/cugraph-pyg/meta.yaml index 7d3e503e..10122f64 100644 --- a/conda/recipes/cugraph-pyg/meta.yaml +++ b/conda/recipes/cugraph-pyg/meta.yaml @@ -30,6 +30,7 @@ requirements: - rapids-dask-dependency ={{ minor_version }} - numba >=0.57 - numpy >=1.23,<3.0a0 + - pandas - python - pytorch >=2.3,<2.4.0a0 - cupy >=12.0.0 diff --git a/dependencies.yaml b/dependencies.yaml index e6f39f34..a0f9e2d4 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -32,8 +32,6 @@ files: - test_cpp - test_notebook - test_python_common - - test_python_cugraph_dgl - - test_python_cugraph_pyg - test_python_pylibwholegraph checks: @@ -126,9 +124,9 @@ files: table: project.optional-dependencies key: test includes: - - test_python_common - - test_python_cugraph_dgl - depends_on_pylibwholegraph + - depends_on_pytorch + - test_python_common py_build_cugraph_pyg: output: pyproject pyproject_dir: python/cugraph-pyg @@ -153,10 +151,8 @@ files: key: test includes: - test_python_common - - test_python_cugraph_pyg - depends_on_pylibwholegraph - cugraph_dgl_dev: matrix: cuda: ["11.8"] @@ -170,7 +166,6 @@ files: - depends_on_pytorch - cugraph_dgl_dev - test_python_common - - test_python_cugraph_dgl cugraph_pyg_dev: matrix: cuda: ["11.8"] @@ -183,7 +178,6 @@ files: - depends_on_pytorch - cugraph_pyg_dev - test_python_common - - test_python_cugraph_pyg channels: - rapidsai - rapidsai-nightly @@ -320,6 +314,7 @@ dependencies: packages: - *numba - *numpy + - pandas rapids_build_skbuild: common: - output_types: [conda, requirements, pyproject] @@ -361,16 +356,6 @@ dependencies: - pytest-benchmark - pytest-cov - pytest-xdist - test_python_cugraph_dgl: - common: - - output_types: [conda, pyproject, requirements] - packages: - - &pandas pandas - test_python_cugraph_pyg: - common: - - output_types: [conda, pyproject, requirements] - packages: - - *pandas test_python_pylibwholegraph: common: - output_types: [conda, pyproject, requirements] diff --git a/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml b/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml index f6490bd0..04cbd567 100644 --- a/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml +++ b/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml @@ -11,7 +11,6 @@ dependencies: - cugraph==24.12.*,>=0.0.0a0 - dgl>=1.1.0.cu* - dglteam/label/th21_cu118::dgl -- pandas - pre-commit - pydantic - pylibcugraphops==24.12.*,>=0.0.0a0 diff --git a/python/cugraph-dgl/pyproject.toml b/python/cugraph-dgl/pyproject.toml index 8b2e84e3..ea090e08 100644 --- a/python/cugraph-dgl/pyproject.toml +++ b/python/cugraph-dgl/pyproject.toml @@ -32,12 +32,13 @@ dependencies = [ [project.optional-dependencies] test = [ - "pandas", "pylibwholegraph==24.12.*,>=0.0.0a0", "pytest", "pytest-benchmark", "pytest-cov", "pytest-xdist", + "tensordict>=0.1.2", + "torch>=2.0,<2.4.0a0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. [project.urls] diff --git a/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml b/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml index 1297d073..6f8b22a9 100644 --- a/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml +++ b/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml @@ -9,7 +9,6 @@ channels: - nvidia dependencies: - cugraph==24.12.*,>=0.0.0a0 -- pandas - pre-commit - pydantic - pyg>=2.5,<2.6 diff --git a/python/cugraph-pyg/pyproject.toml b/python/cugraph-pyg/pyproject.toml index 30ac81e5..0ace9280 100644 --- a/python/cugraph-pyg/pyproject.toml +++ b/python/cugraph-pyg/pyproject.toml @@ -32,6 +32,7 @@ dependencies = [ "cugraph==24.12.*,>=0.0.0a0", "numba>=0.57", "numpy>=1.23,<3.0a0", + "pandas", "pylibcugraphops==24.12.*,>=0.0.0a0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. @@ -41,7 +42,6 @@ Documentation = "https://docs.rapids.ai/api/cugraph/stable/" [project.optional-dependencies] test = [ - "pandas", "pylibwholegraph==24.12.*,>=0.0.0a0", "pytest", "pytest-benchmark", From 2ed9905848f0d1027bc0d3bb19de5f42ad95c524 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 21 Oct 2024 13:09:31 -0500 Subject: [PATCH 06/18] remove test_wheel.sh script --- ci/test_wheel.sh | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100755 ci/test_wheel.sh diff --git a/ci/test_wheel.sh b/ci/test_wheel.sh deleted file mode 100755 index 38dad935..00000000 --- a/ci/test_wheel.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# Copyright (c) 2023-2024, NVIDIA CORPORATION. - -set -eoxu pipefail - -package_name=$1 - -python_package_name=$(echo ${package_name}|sed 's/-/_/g') - -mkdir -p ./dist -RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" -RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist - -# echo to expand wildcard before adding `[extra]` requires for pip -python -m pip install \ - "$(echo ./dist/${python_package_name}*.whl)[test]" - -# Run smoke tests for aarch64 pull requests -arch=$(uname -m) -if [[ "${arch}" == "aarch64" && ${RAPIDS_BUILD_TYPE} == "pull-request" ]]; then - python ./ci/wheel_smoke_test_${package_name}.py -else - # Test runs that include tests that use dask require - # --import-mode=append. See test_python.sh for details. - # FIXME: Adding PY_IGNORE_IMPORTMISMATCH=1 to workaround conftest.py import - # mismatch error seen by nx-cugraph after using pytest 8 and - # --import-mode=append. - RAPIDS_DATASET_ROOT_DIR=`pwd`/datasets \ - PY_IGNORE_IMPORTMISMATCH=1 \ - DASK_WORKER_DEVICES="0" \ - DASK_DISTRIBUTED__SCHEDULER__WORKER_TTL="1000s" \ - DASK_DISTRIBUTED__COMM__TIMEOUTS__CONNECT="1000s" \ - DASK_CUDA_WAIT_WORKERS_MIN_TIMEOUT="1000s" \ - python -m pytest \ - -v \ - --import-mode=append \ - --benchmark-disable \ - ./python/${package_name}/${python_package_name}/tests -fi From 802e46cbb933368b04879f796cedaa512b6e6b83 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 21 Oct 2024 14:00:48 -0500 Subject: [PATCH 07/18] declare torch testing dependency for cugraph-dgl, combine pip installs again --- ci/test_wheel_cugraph-dgl.sh | 10 +++------- ci/test_wheel_cugraph-pyg.sh | 7 +------ ci/test_wheel_pylibwholegraph.sh | 9 ++------- dependencies.yaml | 3 ++- python/cugraph-pyg/pyproject.toml | 2 ++ 5 files changed, 10 insertions(+), 21 deletions(-) diff --git a/ci/test_wheel_cugraph-dgl.sh b/ci/test_wheel_cugraph-dgl.sh index 07db3b2b..9c47a3ab 100755 --- a/ci/test_wheel_cugraph-dgl.sh +++ b/ci/test_wheel_cugraph-dgl.sh @@ -26,15 +26,11 @@ DGL_URL="https://data.dgl.ai/wheels/torch-2.3/cu${PYTORCH_CUDA_VER}/repo.html" # echo to expand wildcard before adding `[extra]` requires for pip python -m pip install \ -v \ + --extra-index-url "${PYTORCH_URL}" \ --find-links "${DGL_URL}" \ "$(echo ./local-deps/pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}*.whl)" \ "$(echo ./dist/cugraph_dgl_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]" \ - 'dgl==2.4.0' - -# install torch separately, to be sure we get a CUDA build -python -m pip install \ - --index-url "${PYTORCH_URL}" \ - -v \ - 'torch>=2.0,<2.4.0a0' + 'dgl==2.4.0' \ + 'torch>=2.0,<2.4.0a0' python -m pytest python/cugraph-dgl/cugraph_dgl/tests diff --git a/ci/test_wheel_cugraph-pyg.sh b/ci/test_wheel_cugraph-pyg.sh index dd9c9f30..25d25b7c 100755 --- a/ci/test_wheel_cugraph-pyg.sh +++ b/ci/test_wheel_cugraph-pyg.sh @@ -24,6 +24,7 @@ fi # echo to expand wildcard before adding `[extra]` requires for pip python -m pip install \ -v \ + --index-url "${PYTORCH_URL}" \ --find-links "${PYG_URL}" \ "$(echo ./local-deps/pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}*.whl)" \ "$(echo ./dist/cugraph_pyg_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]" \ @@ -33,12 +34,6 @@ python -m pip install \ 'torch_scatter' \ 'torch_sparse' -# install torch separately, to be sure we get a CUDA build -python -m pip install \ - --index-url "${PYTORCH_URL}" \ - -v \ - 'torch>=2.0,<2.4.0a0' - # RAPIDS_DATASET_ROOT_DIR is used by test scripts export RAPIDS_DATASET_ROOT_DIR="$(realpath datasets)" diff --git a/ci/test_wheel_pylibwholegraph.sh b/ci/test_wheel_pylibwholegraph.sh index 823ae186..6d4b7d98 100755 --- a/ci/test_wheel_pylibwholegraph.sh +++ b/ci/test_wheel_pylibwholegraph.sh @@ -25,13 +25,8 @@ mkdir -p "${RAPIDS_TESTS_DIR}" "${RAPIDS_COVERAGE_DIR}" rapids-logger "Installing Packages" rapids-retry python -m pip install \ --extra-index-url ${INDEX_URL} \ - "$(echo ./dist/pylibwholegraph*.whl)[test]" - -# install torch separately, to be sure we get a CUDA build -python -m pip install \ - --index-url "${INDEX_URL}" \ - -v \ - 'torch>=2.0,<2.4.0a0' + "$(echo ./dist/pylibwholegraph*.whl)[test]" \ + 'torch>=2.0,<2.4.0a0' rapids-logger "pytest pylibwholegraph" cd python/pylibwholegraph/pylibwholegraph/tests diff --git a/dependencies.yaml b/dependencies.yaml index a0f9e2d4..0fe93b97 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -150,8 +150,9 @@ files: table: project.optional-dependencies key: test includes: - - test_python_common - depends_on_pylibwholegraph + - depends_on_pytorch + - test_python_common cugraph_dgl_dev: matrix: diff --git a/python/cugraph-pyg/pyproject.toml b/python/cugraph-pyg/pyproject.toml index 0ace9280..d5c97865 100644 --- a/python/cugraph-pyg/pyproject.toml +++ b/python/cugraph-pyg/pyproject.toml @@ -47,6 +47,8 @@ test = [ "pytest-benchmark", "pytest-cov", "pytest-xdist", + "tensordict>=0.1.2", + "torch>=2.0,<2.4.0a0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. [tool.setuptools] From 4033210bef3328625cfaf93a37506660e72d9425 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 21 Oct 2024 14:55:06 -0500 Subject: [PATCH 08/18] use pytorch_geometric instead of pyg --- ci/test_wheel_cugraph-pyg.sh | 9 ++----- .../all_cuda-118_arch-x86_64.yaml | 3 +-- .../all_cuda-121_arch-x86_64.yaml | 3 +-- .../all_cuda-124_arch-x86_64.yaml | 3 +-- dependencies.yaml | 25 ++++++++++--------- .../conda/cugraph_dgl_dev_cuda-118.yaml | 1 - .../conda/cugraph_pyg_dev_cuda-118.yaml | 3 +-- python/cugraph-pyg/pyproject.toml | 3 +++ 8 files changed, 22 insertions(+), 28 deletions(-) diff --git a/ci/test_wheel_cugraph-pyg.sh b/ci/test_wheel_cugraph-pyg.sh index 25d25b7c..34654c43 100755 --- a/ci/test_wheel_cugraph-pyg.sh +++ b/ci/test_wheel_cugraph-pyg.sh @@ -24,15 +24,10 @@ fi # echo to expand wildcard before adding `[extra]` requires for pip python -m pip install \ -v \ - --index-url "${PYTORCH_URL}" \ + --extra-index-url "${PYTORCH_URL}" \ --find-links "${PYG_URL}" \ "$(echo ./local-deps/pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}*.whl)" \ - "$(echo ./dist/cugraph_pyg_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]" \ - 'ogb' \ - 'pyg_lib' \ - 'torch-geometric>=2.5,<2.6' \ - 'torch_scatter' \ - 'torch_sparse' + "$(echo ./dist/cugraph_pyg_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]" # RAPIDS_DATASET_ROOT_DIR is used by test scripts export RAPIDS_DATASET_ROOT_DIR="$(realpath datasets)" diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 2ab91029..128c1276 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -4,7 +4,6 @@ channels: - rapidsai - rapidsai-nightly - dask/label/dev -- pyg - conda-forge - nvidia dependencies: @@ -33,7 +32,6 @@ dependencies: - pre-commit - pydantic - pydata-sphinx-theme -- pyg::pyg - pylibcugraphops==24.12.*,>=0.0.0a0 - pylibraft==24.12.*,>=0.0.0a0 - pytest @@ -43,6 +41,7 @@ dependencies: - pytest-xdist - pytorch-cuda=11.8 - pytorch::pytorch>=2.0,<2.4.0a0 +- pytorch_geometric>=2.5,<2.6 - raft-dask==24.12.*,>=0.0.0a0 - rapids-build-backend>=0.3.0,<0.4.0.dev0 - recommonmark diff --git a/conda/environments/all_cuda-121_arch-x86_64.yaml b/conda/environments/all_cuda-121_arch-x86_64.yaml index d7f796d4..ef26fd9d 100644 --- a/conda/environments/all_cuda-121_arch-x86_64.yaml +++ b/conda/environments/all_cuda-121_arch-x86_64.yaml @@ -4,7 +4,6 @@ channels: - rapidsai - rapidsai-nightly - dask/label/dev -- pyg - conda-forge - nvidia dependencies: @@ -38,7 +37,6 @@ dependencies: - pre-commit - pydantic - pydata-sphinx-theme -- pyg::pyg - pylibcugraphops==24.12.*,>=0.0.0a0 - pylibraft==24.12.*,>=0.0.0a0 - pytest @@ -48,6 +46,7 @@ dependencies: - pytest-xdist - pytorch-cuda=12.1 - pytorch::pytorch>=2.0,<2.4.0a0 +- pytorch_geometric>=2.5,<2.6 - raft-dask==24.12.*,>=0.0.0a0 - rapids-build-backend>=0.3.0,<0.4.0.dev0 - recommonmark diff --git a/conda/environments/all_cuda-124_arch-x86_64.yaml b/conda/environments/all_cuda-124_arch-x86_64.yaml index b17d547a..2d98323b 100644 --- a/conda/environments/all_cuda-124_arch-x86_64.yaml +++ b/conda/environments/all_cuda-124_arch-x86_64.yaml @@ -4,7 +4,6 @@ channels: - rapidsai - rapidsai-nightly - dask/label/dev -- pyg - conda-forge - nvidia dependencies: @@ -38,7 +37,6 @@ dependencies: - pre-commit - pydantic - pydata-sphinx-theme -- pyg::pyg - pylibcugraphops==24.12.*,>=0.0.0a0 - pylibraft==24.12.*,>=0.0.0a0 - pytest @@ -48,6 +46,7 @@ dependencies: - pytest-xdist - pytorch-cuda=12.1 - pytorch::pytorch>=2.0,<2.4.0a0 +- pytorch_geometric>=2.5,<2.6 - raft-dask==24.12.*,>=0.0.0a0 - rapids-build-backend>=0.3.0,<0.4.0.dev0 - recommonmark diff --git a/dependencies.yaml b/dependencies.yaml index 0fe93b97..4b2ad1dc 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -142,6 +142,7 @@ files: includes: - depends_on_cugraph - depends_on_pylibcugraphops + - depends_on_pyg - python_run_cugraph_pyg py_test_cugraph_pyg: output: pyproject @@ -153,6 +154,7 @@ files: - depends_on_pylibwholegraph - depends_on_pytorch - test_python_common + - test_python_cugraph_pyg cugraph_dgl_dev: matrix: @@ -175,6 +177,7 @@ files: includes: - checks - depends_on_cugraph + - depends_on_pyg - depends_on_pylibcugraphops - depends_on_pytorch - cugraph_pyg_dev @@ -183,7 +186,6 @@ channels: - rapidsai - rapidsai-nightly - dask/label/dev - - pyg - conda-forge - nvidia dependencies: @@ -357,6 +359,12 @@ dependencies: - pytest-benchmark - pytest-cov - pytest-xdist + test_python_cugraph_pyg: + common: + - output_types: [conda, pyproject, requirements] + packages: + - ogb + - torch-geometric>=2.5,<2.6 test_python_pylibwholegraph: common: - output_types: [conda, pyproject, requirements] @@ -374,7 +382,6 @@ dependencies: - output_types: [conda] packages: - *tensordict - - pyg>=2.5,<2.6 depends_on_pytorch: common: @@ -426,16 +433,10 @@ dependencies: - {matrix: null, packages: ["dglteam/label/th23_cu121::dgl"]} depends_on_pyg: - specific: - - output_types: [conda] - matrices: - - matrix: {cuda: "12.*"} - packages: - - "pyg::pyg" - - matrix: {cuda: "11.*"} - packages: - - "pyg::pyg" - - {matrix: null, packages: ["pyg::pyg"]} + common: + - output_types: [conda, pyproject, requirements] + packages: + - pytorch_geometric>=2.5,<2.6 depends_on_pylibwholegraph: common: diff --git a/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml b/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml index 04cbd567..dabd8795 100644 --- a/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml +++ b/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml @@ -4,7 +4,6 @@ channels: - rapidsai - rapidsai-nightly - dask/label/dev -- pyg - conda-forge - nvidia dependencies: diff --git a/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml b/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml index 6f8b22a9..5414bfd7 100644 --- a/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml +++ b/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml @@ -4,14 +4,12 @@ channels: - rapidsai - rapidsai-nightly - dask/label/dev -- pyg - conda-forge - nvidia dependencies: - cugraph==24.12.*,>=0.0.0a0 - pre-commit - pydantic -- pyg>=2.5,<2.6 - pylibcugraphops==24.12.*,>=0.0.0a0 - pytest - pytest-benchmark @@ -19,6 +17,7 @@ dependencies: - pytest-xdist - pytorch-cuda=11.8 - pytorch::pytorch>=2.0,<2.4.0a0 +- pytorch_geometric>=2.5,<2.6 - tensordict>=0.1.2 - torchdata name: cugraph_pyg_dev_cuda-118 diff --git a/python/cugraph-pyg/pyproject.toml b/python/cugraph-pyg/pyproject.toml index d5c97865..3a1d5bf7 100644 --- a/python/cugraph-pyg/pyproject.toml +++ b/python/cugraph-pyg/pyproject.toml @@ -34,6 +34,7 @@ dependencies = [ "numpy>=1.23,<3.0a0", "pandas", "pylibcugraphops==24.12.*,>=0.0.0a0", + "pytorch_geometric>=2.5,<2.6", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. [project.urls] @@ -42,12 +43,14 @@ Documentation = "https://docs.rapids.ai/api/cugraph/stable/" [project.optional-dependencies] test = [ + "ogb", "pylibwholegraph==24.12.*,>=0.0.0a0", "pytest", "pytest-benchmark", "pytest-cov", "pytest-xdist", "tensordict>=0.1.2", + "torch-geometric>=2.5,<2.6", "torch>=2.0,<2.4.0a0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. From fad3e8b3ee9194052235514bcbbe3ea438dc19ae Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 21 Oct 2024 15:20:13 -0500 Subject: [PATCH 09/18] the pip package is called 'torch-geometric' not 'pytorch_geometric' --- dependencies.yaml | 7 +++++-- python/cugraph-pyg/pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dependencies.yaml b/dependencies.yaml index 4b2ad1dc..748a9d28 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -151,6 +151,7 @@ files: table: project.optional-dependencies key: test includes: + - depends_on_pyg - depends_on_pylibwholegraph - depends_on_pytorch - test_python_common @@ -364,7 +365,6 @@ dependencies: - output_types: [conda, pyproject, requirements] packages: - ogb - - torch-geometric>=2.5,<2.6 test_python_pylibwholegraph: common: - output_types: [conda, pyproject, requirements] @@ -434,9 +434,12 @@ dependencies: depends_on_pyg: common: - - output_types: [conda, pyproject, requirements] + - output_types: [conda] packages: - pytorch_geometric>=2.5,<2.6 + - output_types: [pyproject, requirements] + packages: + - torch-geometric>=2.5,<2.6 depends_on_pylibwholegraph: common: diff --git a/python/cugraph-pyg/pyproject.toml b/python/cugraph-pyg/pyproject.toml index 3a1d5bf7..ba13b8ff 100644 --- a/python/cugraph-pyg/pyproject.toml +++ b/python/cugraph-pyg/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ "numpy>=1.23,<3.0a0", "pandas", "pylibcugraphops==24.12.*,>=0.0.0a0", - "pytorch_geometric>=2.5,<2.6", + "torch-geometric>=2.5,<2.6", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. [project.urls] From 887e32f3cfe62781332df3b9644f893644706e0a Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 21 Oct 2024 16:30:22 -0500 Subject: [PATCH 10/18] update dgl doc, include karata.csv --- .github/workflows/pr.yaml | 46 +++--- .../all_cuda-118_arch-x86_64.yaml | 2 +- .../all_cuda-121_arch-x86_64.yaml | 2 +- .../all_cuda-124_arch-x86_64.yaml | 2 +- datasets/karate.csv | 156 ++++++++++++++++++ dependencies.yaml | 6 +- python/cugraph-dgl/README.md | 7 +- .../conda/cugraph_dgl_dev_cuda-118.yaml | 4 +- 8 files changed, 192 insertions(+), 33 deletions(-) create mode 100644 datasets/karate.csv diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index ea2db9e0..05572176 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -14,10 +14,10 @@ jobs: needs: - changed-files - checks - - conda-cpp-build + # - conda-cpp-build # - conda-cpp-tests - - conda-python-build - - conda-python-tests + # - conda-python-build + # - conda-python-tests - wheel-build-pylibwholegraph # - wheel-tests-pylibwholegraph - wheel-build-cugraph-dgl @@ -64,13 +64,13 @@ jobs: uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.12 with: enable_check_generated_files: false - conda-cpp-build: - needs: checks - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.12 - with: - build_type: pull-request - node_type: cpu32 + # conda-cpp-build: + # needs: checks + # secrets: inherit + # uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.12 + # with: + # build_type: pull-request + # node_type: cpu32 # conda-cpp-tests: # needs: [conda-cpp-build, changed-files] # secrets: inherit @@ -78,19 +78,19 @@ jobs: # if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp # with: # build_type: pull-request - conda-python-build: - needs: conda-cpp-build - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12 - with: - build_type: pull-request - conda-python-tests: - needs: [conda-python-build, changed-files] - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12 - if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python - with: - build_type: pull-request + # conda-python-build: + # needs: conda-cpp-build + # secrets: inherit + # uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12 + # with: + # build_type: pull-request + # conda-python-tests: + # needs: [conda-python-build, changed-files] + # secrets: inherit + # uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12 + # if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python + # with: + # build_type: pull-request wheel-build-pylibwholegraph: needs: checks secrets: inherit diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 128c1276..985c1706 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -17,7 +17,7 @@ dependencies: - cupy>=12.0.0 - cython>=3.0.0 - dask-cudf==24.12.*,>=0.0.0a0 -- dglteam/label/th21_cu118::dgl +- dglteam/label/th23_cu118::dgl - doxygen - graphviz - ipython diff --git a/conda/environments/all_cuda-121_arch-x86_64.yaml b/conda/environments/all_cuda-121_arch-x86_64.yaml index ef26fd9d..44e69355 100644 --- a/conda/environments/all_cuda-121_arch-x86_64.yaml +++ b/conda/environments/all_cuda-121_arch-x86_64.yaml @@ -18,7 +18,7 @@ dependencies: - cupy>=12.0.0 - cython>=3.0.0 - dask-cudf==24.12.*,>=0.0.0a0 -- dglteam/label/th21_cu121::dgl +- dglteam/label/th23_cu121::dgl - doxygen - graphviz - ipython diff --git a/conda/environments/all_cuda-124_arch-x86_64.yaml b/conda/environments/all_cuda-124_arch-x86_64.yaml index 2d98323b..f3860dde 100644 --- a/conda/environments/all_cuda-124_arch-x86_64.yaml +++ b/conda/environments/all_cuda-124_arch-x86_64.yaml @@ -18,7 +18,7 @@ dependencies: - cupy>=12.0.0 - cython>=3.0.0 - dask-cudf==24.12.*,>=0.0.0a0 -- dglteam/label/th21_cu121::dgl +- dglteam/label/th23_cu121::dgl - doxygen - graphviz - ipython diff --git a/datasets/karate.csv b/datasets/karate.csv new file mode 100644 index 00000000..4ed9f435 --- /dev/null +++ b/datasets/karate.csv @@ -0,0 +1,156 @@ +1 0 1.0 +2 0 1.0 +3 0 1.0 +4 0 1.0 +5 0 1.0 +6 0 1.0 +7 0 1.0 +8 0 1.0 +10 0 1.0 +11 0 1.0 +12 0 1.0 +13 0 1.0 +17 0 1.0 +19 0 1.0 +21 0 1.0 +31 0 1.0 +2 1 1.0 +3 1 1.0 +7 1 1.0 +13 1 1.0 +17 1 1.0 +19 1 1.0 +21 1 1.0 +30 1 1.0 +3 2 1.0 +7 2 1.0 +8 2 1.0 +9 2 1.0 +13 2 1.0 +27 2 1.0 +28 2 1.0 +32 2 1.0 +7 3 1.0 +12 3 1.0 +13 3 1.0 +6 4 1.0 +10 4 1.0 +6 5 1.0 +10 5 1.0 +16 5 1.0 +16 6 1.0 +30 8 1.0 +32 8 1.0 +33 8 1.0 +33 9 1.0 +33 13 1.0 +32 14 1.0 +33 14 1.0 +32 15 1.0 +33 15 1.0 +32 18 1.0 +33 18 1.0 +33 19 1.0 +32 20 1.0 +33 20 1.0 +32 22 1.0 +33 22 1.0 +25 23 1.0 +27 23 1.0 +29 23 1.0 +32 23 1.0 +33 23 1.0 +25 24 1.0 +27 24 1.0 +31 24 1.0 +31 25 1.0 +29 26 1.0 +33 26 1.0 +33 27 1.0 +31 28 1.0 +33 28 1.0 +32 29 1.0 +33 29 1.0 +32 30 1.0 +33 30 1.0 +32 31 1.0 +33 31 1.0 +33 32 1.0 +0 1 1.0 +0 2 1.0 +0 3 1.0 +0 4 1.0 +0 5 1.0 +0 6 1.0 +0 7 1.0 +0 8 1.0 +0 10 1.0 +0 11 1.0 +0 12 1.0 +0 13 1.0 +0 17 1.0 +0 19 1.0 +0 21 1.0 +0 31 1.0 +1 2 1.0 +1 3 1.0 +1 7 1.0 +1 13 1.0 +1 17 1.0 +1 19 1.0 +1 21 1.0 +1 30 1.0 +2 3 1.0 +2 7 1.0 +2 8 1.0 +2 9 1.0 +2 13 1.0 +2 27 1.0 +2 28 1.0 +2 32 1.0 +3 7 1.0 +3 12 1.0 +3 13 1.0 +4 6 1.0 +4 10 1.0 +5 6 1.0 +5 10 1.0 +5 16 1.0 +6 16 1.0 +8 30 1.0 +8 32 1.0 +8 33 1.0 +9 33 1.0 +13 33 1.0 +14 32 1.0 +14 33 1.0 +15 32 1.0 +15 33 1.0 +18 32 1.0 +18 33 1.0 +19 33 1.0 +20 32 1.0 +20 33 1.0 +22 32 1.0 +22 33 1.0 +23 25 1.0 +23 27 1.0 +23 29 1.0 +23 32 1.0 +23 33 1.0 +24 25 1.0 +24 27 1.0 +24 31 1.0 +25 31 1.0 +26 29 1.0 +26 33 1.0 +27 33 1.0 +28 31 1.0 +28 33 1.0 +29 32 1.0 +29 33 1.0 +30 32 1.0 +30 33 1.0 +31 32 1.0 +31 33 1.0 +32 33 1.0 diff --git a/dependencies.yaml b/dependencies.yaml index 748a9d28..55dcbfd9 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -375,7 +375,7 @@ dependencies: common: - output_types: [conda] packages: - - dgl>=1.1.0.cu* + - dgl>=2.4.0.cu* - &tensordict tensordict>=0.1.2 cugraph_pyg_dev: common: @@ -426,10 +426,10 @@ dependencies: matrices: - matrix: {cuda: "12.*"} packages: - - "dglteam/label/th21_cu121::dgl" + - "dglteam/label/th23_cu121::dgl" - matrix: {cuda: "11.*"} packages: - - "dglteam/label/th21_cu118::dgl" + - "dglteam/label/th23_cu118::dgl" - {matrix: null, packages: ["dglteam/label/th23_cu121::dgl"]} depends_on_pyg: diff --git a/python/cugraph-dgl/README.md b/python/cugraph-dgl/README.md index ac4cb2f6..e0ea5fc2 100644 --- a/python/cugraph-dgl/README.md +++ b/python/cugraph-dgl/README.md @@ -9,8 +9,11 @@ Install and update cugraph-dgl and the required dependencies using the command: ``` -conda install mamba -n base -c conda-forge -mamba install cugraph-dgl -c rapidsai-nightly -c rapidsai -c pytorch -c conda-forge -c nvidia -c dglteam +# CUDA 11 +conda install -c rapidsai -c pytorch -c conda-forge -c nvidia -c dglteam/label/th23_cu118 cugraph-dgl + +# CUDA 12 +conda install -c rapidsai -c pytorch -c conda-forge -c nvidia -c dglteam/label/th23_cu121 cugraph-dgl ``` ## Build from Source diff --git a/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml b/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml index dabd8795..fc3d54f6 100644 --- a/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml +++ b/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml @@ -8,8 +8,8 @@ channels: - nvidia dependencies: - cugraph==24.12.*,>=0.0.0a0 -- dgl>=1.1.0.cu* -- dglteam/label/th21_cu118::dgl +- dgl>=2.4.0.cu* +- dglteam/label/th23_cu118::dgl - pre-commit - pydantic - pylibcugraphops==24.12.*,>=0.0.0a0 From 4344fd0c454a21ac8f0f186ca42a36f9c7c240e5 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 21 Oct 2024 16:38:37 -0500 Subject: [PATCH 11/18] update to pytorch and dgl pins used in cugraph repo --- conda/environments/all_cuda-118_arch-x86_64.yaml | 4 ++-- conda/environments/all_cuda-121_arch-x86_64.yaml | 4 ++-- conda/environments/all_cuda-124_arch-x86_64.yaml | 4 ++-- dependencies.yaml | 10 +++++----- python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml | 4 ++-- python/cugraph-dgl/pyproject.toml | 2 +- python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml | 2 +- python/cugraph-pyg/pyproject.toml | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 985c1706..aaef9343 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -17,7 +17,7 @@ dependencies: - cupy>=12.0.0 - cython>=3.0.0 - dask-cudf==24.12.*,>=0.0.0a0 -- dglteam/label/th23_cu118::dgl +- dglteam/label/th23_cu118::dgl>=2.4.0.th23.cu* - doxygen - graphviz - ipython @@ -40,7 +40,7 @@ dependencies: - pytest-forked - pytest-xdist - pytorch-cuda=11.8 -- pytorch::pytorch>=2.0,<2.4.0a0 +- pytorch::pytorch>=2.3,<2.4.0a0 - pytorch_geometric>=2.5,<2.6 - raft-dask==24.12.*,>=0.0.0a0 - rapids-build-backend>=0.3.0,<0.4.0.dev0 diff --git a/conda/environments/all_cuda-121_arch-x86_64.yaml b/conda/environments/all_cuda-121_arch-x86_64.yaml index 44e69355..e6422ee9 100644 --- a/conda/environments/all_cuda-121_arch-x86_64.yaml +++ b/conda/environments/all_cuda-121_arch-x86_64.yaml @@ -18,7 +18,7 @@ dependencies: - cupy>=12.0.0 - cython>=3.0.0 - dask-cudf==24.12.*,>=0.0.0a0 -- dglteam/label/th23_cu121::dgl +- dglteam/label/th23_cu121::dgl>=2.4.0.th23.cu* - doxygen - graphviz - ipython @@ -45,7 +45,7 @@ dependencies: - pytest-forked - pytest-xdist - pytorch-cuda=12.1 -- pytorch::pytorch>=2.0,<2.4.0a0 +- pytorch::pytorch>=2.3,<2.4.0a0 - pytorch_geometric>=2.5,<2.6 - raft-dask==24.12.*,>=0.0.0a0 - rapids-build-backend>=0.3.0,<0.4.0.dev0 diff --git a/conda/environments/all_cuda-124_arch-x86_64.yaml b/conda/environments/all_cuda-124_arch-x86_64.yaml index f3860dde..47a7a9bf 100644 --- a/conda/environments/all_cuda-124_arch-x86_64.yaml +++ b/conda/environments/all_cuda-124_arch-x86_64.yaml @@ -18,7 +18,7 @@ dependencies: - cupy>=12.0.0 - cython>=3.0.0 - dask-cudf==24.12.*,>=0.0.0a0 -- dglteam/label/th23_cu121::dgl +- dglteam/label/th23_cu121::dgl>=2.4.0.th23.cu* - doxygen - graphviz - ipython @@ -45,7 +45,7 @@ dependencies: - pytest-forked - pytest-xdist - pytorch-cuda=12.1 -- pytorch::pytorch>=2.0,<2.4.0a0 +- pytorch::pytorch>=2.3,<2.4.0a0 - pytorch_geometric>=2.5,<2.6 - raft-dask==24.12.*,>=0.0.0a0 - rapids-build-backend>=0.3.0,<0.4.0.dev0 diff --git a/dependencies.yaml b/dependencies.yaml index 55dcbfd9..37b92626 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -387,7 +387,7 @@ dependencies: common: - output_types: [conda] packages: - - pytorch::pytorch>=2.0,<2.4.0a0 + - pytorch::pytorch>=2.3,<2.4.0a0 - torchdata - pydantic specific: @@ -404,7 +404,7 @@ dependencies: matrices: - matrix: {cuda: "12.*"} packages: - - &pytorch_pip torch>=2.0,<2.4.0a0 + - &pytorch_pip torch>=2.3,<2.4.0a0 - *tensordict - matrix: {cuda: "11.*"} packages: @@ -426,11 +426,11 @@ dependencies: matrices: - matrix: {cuda: "12.*"} packages: - - "dglteam/label/th23_cu121::dgl" + - "dglteam/label/th23_cu121::dgl>=2.4.0.th23.cu*" - matrix: {cuda: "11.*"} packages: - - "dglteam/label/th23_cu118::dgl" - - {matrix: null, packages: ["dglteam/label/th23_cu121::dgl"]} + - "dglteam/label/th23_cu118::dgl>=2.4.0.th23.cu*" + - {matrix: null, packages: ["dglteam/label/th23_cu121::dgl>=2.4.0.th23.cu*"]} depends_on_pyg: common: diff --git a/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml b/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml index fc3d54f6..2bf192e3 100644 --- a/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml +++ b/python/cugraph-dgl/conda/cugraph_dgl_dev_cuda-118.yaml @@ -9,7 +9,7 @@ channels: dependencies: - cugraph==24.12.*,>=0.0.0a0 - dgl>=2.4.0.cu* -- dglteam/label/th23_cu118::dgl +- dglteam/label/th23_cu118::dgl>=2.4.0.th23.cu* - pre-commit - pydantic - pylibcugraphops==24.12.*,>=0.0.0a0 @@ -18,7 +18,7 @@ dependencies: - pytest-cov - pytest-xdist - pytorch-cuda=11.8 -- pytorch::pytorch>=2.0,<2.4.0a0 +- pytorch::pytorch>=2.3,<2.4.0a0 - tensordict>=0.1.2 - torchdata name: cugraph_dgl_dev_cuda-118 diff --git a/python/cugraph-dgl/pyproject.toml b/python/cugraph-dgl/pyproject.toml index ea090e08..7a29408f 100644 --- a/python/cugraph-dgl/pyproject.toml +++ b/python/cugraph-dgl/pyproject.toml @@ -38,7 +38,7 @@ test = [ "pytest-cov", "pytest-xdist", "tensordict>=0.1.2", - "torch>=2.0,<2.4.0a0", + "torch>=2.3,<2.4.0a0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. [project.urls] diff --git a/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml b/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml index 5414bfd7..f5f1bfbe 100644 --- a/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml +++ b/python/cugraph-pyg/conda/cugraph_pyg_dev_cuda-118.yaml @@ -16,7 +16,7 @@ dependencies: - pytest-cov - pytest-xdist - pytorch-cuda=11.8 -- pytorch::pytorch>=2.0,<2.4.0a0 +- pytorch::pytorch>=2.3,<2.4.0a0 - pytorch_geometric>=2.5,<2.6 - tensordict>=0.1.2 - torchdata diff --git a/python/cugraph-pyg/pyproject.toml b/python/cugraph-pyg/pyproject.toml index ba13b8ff..7a565f87 100644 --- a/python/cugraph-pyg/pyproject.toml +++ b/python/cugraph-pyg/pyproject.toml @@ -51,7 +51,7 @@ test = [ "pytest-xdist", "tensordict>=0.1.2", "torch-geometric>=2.5,<2.6", - "torch>=2.0,<2.4.0a0", + "torch>=2.3,<2.4.0a0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. [tool.setuptools] From b86bdd3295c0cb5692a708e7d7600e56cf47e224 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Tue, 22 Oct 2024 13:50:48 -0700 Subject: [PATCH 12/18] update files --- .../cugraph_dgl/dataloading/neighbor_sampler.py | 6 ++---- python/cugraph-dgl/cugraph_dgl/tests/test_graph.py | 9 +++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/python/cugraph-dgl/cugraph_dgl/dataloading/neighbor_sampler.py b/python/cugraph-dgl/cugraph_dgl/dataloading/neighbor_sampler.py index 4ec513cb..ecc51006 100644 --- a/python/cugraph-dgl/cugraph_dgl/dataloading/neighbor_sampler.py +++ b/python/cugraph-dgl/cugraph_dgl/dataloading/neighbor_sampler.py @@ -197,10 +197,8 @@ def sample( if g.is_homogeneous: indices = torch.concat(list(indices)) - ds.sample_from_nodes(indices.long(), batch_size=batch_size) - return HomogeneousSampleReader( - ds.get_reader(), self.output_format, self.edge_dir - ) + reader = ds.sample_from_nodes(indices.long(), batch_size=batch_size) + return HomogeneousSampleReader(reader, self.output_format, self.edge_dir) raise ValueError( "Sampling heterogeneous graphs is currently" diff --git a/python/cugraph-dgl/cugraph_dgl/tests/test_graph.py b/python/cugraph-dgl/cugraph_dgl/tests/test_graph.py index a60db97b..2b9f46df 100644 --- a/python/cugraph-dgl/cugraph_dgl/tests/test_graph.py +++ b/python/cugraph-dgl/cugraph_dgl/tests/test_graph.py @@ -53,10 +53,11 @@ def test_graph_make_homogeneous_graph(direction): graph.nodes() == torch.arange(num_nodes, dtype=torch.int64, device="cuda") ).all() - assert graph.nodes[None]["x"] is not None - assert (graph.nodes[None]["x"] == torch.as_tensor(node_x, device="cuda")).all() + emb = graph.nodes[None]["x"] + assert emb is not None + assert (emb() == torch.as_tensor(node_x, device="cuda")).all() assert ( - graph.nodes[None]["num"] + graph.nodes[None]["num"]() == torch.arange(num_nodes, dtype=torch.int64, device="cuda") ).all() @@ -64,7 +65,7 @@ def test_graph_make_homogeneous_graph(direction): graph.edges("eid", device="cuda") == torch.arange(len(df), dtype=torch.int64, device="cuda") ).all() - assert (graph.edges[None]["weight"] == torch.as_tensor(wgt, device="cuda")).all() + assert (graph.edges[None]["weight"]() == torch.as_tensor(wgt, device="cuda")).all() plc_expected_graph = pylibcugraph.SGGraph( pylibcugraph.ResourceHandle(), From 7897f2fe93d97e8fe8ea89b0f9f46b8e0ff32365 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Tue, 22 Oct 2024 13:51:43 -0700 Subject: [PATCH 13/18] update view.py --- python/cugraph-dgl/cugraph_dgl/view.py | 43 ++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/python/cugraph-dgl/cugraph_dgl/view.py b/python/cugraph-dgl/cugraph_dgl/view.py index dbc53e73..7c4d95f9 100644 --- a/python/cugraph-dgl/cugraph_dgl/view.py +++ b/python/cugraph-dgl/cugraph_dgl/view.py @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import warnings from collections import defaultdict from collections.abc import MutableMapping @@ -20,11 +21,53 @@ import cugraph_dgl from cugraph_dgl.typing import TensorType +from cugraph_dgl.utils.cugraph_conversion_utils import _cast_to_torch_tensor torch = import_optional("torch") dgl = import_optional("dgl") +class EmbeddingView: + def __init__(self, storage: "dgl.storages.base.FeatureStorage", ld: int): + self.__ld = ld + self.__storage = storage + + def __getitem__(self, u: TensorType) -> "torch.Tensor": + u = _cast_to_torch_tensor(u) + try: + return self.__storage.fetch( + u, + "cuda", + ) + except RuntimeError as ex: + warnings.warn( + "Got error accessing data, trying again with index on device: " + + str(ex) + ) + return self.__storage.fetch( + u.cuda(), + "cuda", + ) + + def __call__(self): + warnings.warn( + "Getting an entire embedding tensor is not recommended " + " as it wastes memory. Consider indexing to get only the " + "required elements of the embedding tensor." + ) + return self[torch.arange(self.__ld, dtype=torch.int64)] + + @property + def shape(self) -> "torch.Size": + try: + f = self.__storage.fetch(torch.tensor([0]), "cpu") + except RuntimeError: + f = self.__storage.fetch(torch.tensor([0], device="cuda"), "cuda") + sz = [s for s in f.shape] + sz[0] = self.__ld + return torch.Size(tuple(sz)) + + class HeteroEdgeDataView(MutableMapping): """ Duck-typed version of DGL's HeteroEdgeDataView. From e718840765d47a971d641576e269c44848e213e7 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 28 Oct 2024 09:35:20 -0700 Subject: [PATCH 14/18] set RAPIDS_DATASET_ROOT_DIR --- ci/test_wheel_cugraph-dgl.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/test_wheel_cugraph-dgl.sh b/ci/test_wheel_cugraph-dgl.sh index 9c47a3ab..9cd0e9e1 100755 --- a/ci/test_wheel_cugraph-dgl.sh +++ b/ci/test_wheel_cugraph-dgl.sh @@ -33,4 +33,7 @@ python -m pip install \ 'dgl==2.4.0' \ 'torch>=2.0,<2.4.0a0' +# RAPIDS_DATASET_ROOT_DIR is used by test scripts +export RAPIDS_DATASET_ROOT_DIR="$(realpath datasets)" + python -m pytest python/cugraph-dgl/cugraph_dgl/tests From 7442922056d1c4d60a1967829bf2ac2eb0393d0f Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 28 Oct 2024 11:50:23 -0700 Subject: [PATCH 15/18] re-enable all CI, remove unintentionally-included cufile.log --- .github/workflows/pr.yaml | 82 +++++++++++------------ .gitignore | 4 +- python/cugraph-pyg/cugraph_pyg/cufile.log | 10 --- 3 files changed, 44 insertions(+), 52 deletions(-) delete mode 100644 python/cugraph-pyg/cugraph_pyg/cufile.log diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 05572176..e4451ec5 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -14,12 +14,12 @@ jobs: needs: - changed-files - checks - # - conda-cpp-build - # - conda-cpp-tests - # - conda-python-build - # - conda-python-tests + - conda-cpp-build + - conda-cpp-tests + - conda-python-build + - conda-python-tests - wheel-build-pylibwholegraph - # - wheel-tests-pylibwholegraph + - wheel-tests-pylibwholegraph - wheel-build-cugraph-dgl - wheel-tests-cugraph-dgl - wheel-build-cugraph-pyg @@ -64,33 +64,33 @@ jobs: uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.12 with: enable_check_generated_files: false - # conda-cpp-build: - # needs: checks - # secrets: inherit - # uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.12 - # with: - # build_type: pull-request - # node_type: cpu32 - # conda-cpp-tests: - # needs: [conda-cpp-build, changed-files] - # secrets: inherit - # uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.12 - # if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp - # with: - # build_type: pull-request - # conda-python-build: - # needs: conda-cpp-build - # secrets: inherit - # uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12 - # with: - # build_type: pull-request - # conda-python-tests: - # needs: [conda-python-build, changed-files] - # secrets: inherit - # uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12 - # if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python - # with: - # build_type: pull-request + conda-cpp-build: + needs: checks + secrets: inherit + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.12 + with: + build_type: pull-request + node_type: cpu32 + conda-cpp-tests: + needs: [conda-cpp-build, changed-files] + secrets: inherit + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.12 + if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp + with: + build_type: pull-request + conda-python-build: + needs: conda-cpp-build + secrets: inherit + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12 + with: + build_type: pull-request + conda-python-tests: + needs: [conda-python-build, changed-files] + secrets: inherit + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12 + if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python + with: + build_type: pull-request wheel-build-pylibwholegraph: needs: checks secrets: inherit @@ -99,15 +99,15 @@ jobs: build_type: pull-request script: ci/build_wheel_pylibwholegraph.sh node_type: cpu32 - # wheel-tests-pylibwholegraph: - # needs: [wheel-build-pylibwholegraph, changed-files] - # secrets: inherit - # uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12 - # if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python - # with: - # build_type: pull-request - # script: ci/test_wheel_pylibwholegraph.sh - # matrix_filter: map(select(.ARCH == "amd64")) + wheel-tests-pylibwholegraph: + needs: [wheel-build-pylibwholegraph, changed-files] + secrets: inherit + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12 + if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python + with: + build_type: pull-request + script: ci/test_wheel_pylibwholegraph.sh + matrix_filter: map(select(.ARCH == "amd64")) wheel-build-cugraph-dgl: needs: checks secrets: inherit diff --git a/.gitignore b/.gitignore index 9480c261..7095ae91 100644 --- a/.gitignore +++ b/.gitignore @@ -70,9 +70,11 @@ cpp/thirdparty/googletest/ *.iws ## Datasets -datasets/* +dataset/ +datasets/ !datasets/cyber.csv !datasets/get_test_data.sh +!datasets/karate.csv !datasets/karate-data.csv !datasets/karate_undirected.csv !datasets/karate-disjoint.csv diff --git a/python/cugraph-pyg/cugraph_pyg/cufile.log b/python/cugraph-pyg/cugraph_pyg/cufile.log deleted file mode 100644 index e2dfebf5..00000000 --- a/python/cugraph-pyg/cugraph_pyg/cufile.log +++ /dev/null @@ -1,10 +0,0 @@ - 15-04-2024 10:34:53:950 [pid=291705 tid=291705] NOTICE cufio-drv:705 running in compatible mode - 15-04-2024 10:34:53:950 [pid=290072 tid=290072] NOTICE cufio-drv:705 running in compatible mode - 15-04-2024 10:34:53:950 [pid=291230 tid=291230] NOTICE cufio-drv:705 running in compatible mode - 15-04-2024 10:34:53:950 [pid=291461 tid=291461] NOTICE cufio-drv:705 running in compatible mode - 15-04-2024 10:34:53:950 [pid=290991 tid=290991] NOTICE cufio-drv:705 running in compatible mode - 15-04-2024 10:34:53:950 [pid=290801 tid=290801] NOTICE cufio-drv:705 running in compatible mode - 15-04-2024 10:34:53:954 [pid=290332 tid=290332] NOTICE cufio-drv:705 running in compatible mode - 15-04-2024 10:34:53:958 [pid=290568 tid=290568] NOTICE cufio-drv:705 running in compatible mode - 15-04-2024 10:35:21:342 [pid=292147 tid=292147] NOTICE cufio-drv:705 running in compatible mode - 15-04-2024 10:36:13:377 [pid=292749 tid=292749] NOTICE cufio-drv:705 running in compatible mode From 6cc3decb890d4807b8e5896e1c55329d39f567b8 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 29 Oct 2024 09:49:23 -0500 Subject: [PATCH 16/18] print sccache stats in builds --- .pre-commit-config.yaml | 2 +- ci/build_cpp.sh | 4 ++++ ci/build_python.sh | 4 ++++ ci/build_wheel.sh | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fac41dcd..4bb037b5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,7 +54,7 @@ repos: setup[.]cfg$ - id: verify-alpha-spec - repo: https://github.com/rapidsai/dependency-file-generator - rev: v1.15.1 + rev: v1.16.0 hooks: - id: rapids-dependency-file-generator args: ["--clean"] diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index 5049639a..72026375 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -17,6 +17,10 @@ version=$(rapids-generate-version) rapids-logger "Begin cpp build" +sccache --zero-stats + RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild conda/recipes/libwholegraph +sccache --show-adv-stats + rapids-upload-conda-to-s3 cpp diff --git a/ci/build_python.sh b/ci/build_python.sh index 9f42948b..11b99cd5 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -17,6 +17,8 @@ CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) rapids-generate-version > ./VERSION +sccache --zero-stats + # TODO: Remove `--no-test` flags once importing on a CPU # node works correctly rapids-logger "Begin pylibwholegraph build" @@ -25,6 +27,8 @@ RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --channel "${CPP_CHANNEL}" \ conda/recipes/pylibwholegraph +sccache --show-adv-stats + RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --no-test \ --channel "${CPP_CHANNEL}" \ diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index fc98035a..636bfd38 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -32,6 +32,8 @@ RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" cd "${package_dir}" +sccache --zero-stats + rapids-logger "Building '${package_name}' wheel" python -m pip wheel \ -w dist \ From 1202c36c0b27e342dc6f0a9ac95c01050e2064aa Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 29 Oct 2024 13:07:03 -0700 Subject: [PATCH 17/18] remove unnecessary channel for builds, use CI instead of CI_RUN, consolidate gitignore --- .gitignore | 1 - ci/build_python.sh | 2 -- ci/run_cugraph_pyg_pytests.sh | 2 +- ci/test_wheel_cugraph-pyg.sh | 3 --- python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_mnmg.py | 2 +- python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_sg.py | 4 ++-- python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_snmg.py | 4 ++-- .../cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_mnmg.py | 2 +- python/cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_sg.py | 2 +- .../cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_snmg.py | 4 ++-- 10 files changed, 10 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 7095ae91..4f4b9524 100644 --- a/.gitignore +++ b/.gitignore @@ -70,7 +70,6 @@ cpp/thirdparty/googletest/ *.iws ## Datasets -dataset/ datasets/ !datasets/cyber.csv !datasets/get_test_data.sh diff --git a/ci/build_python.sh b/ci/build_python.sh index 11b99cd5..e3a2c022 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -32,13 +32,11 @@ sccache --show-adv-stats RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --no-test \ --channel "${CPP_CHANNEL}" \ - --channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \ conda/recipes/cugraph-pyg RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --no-test \ --channel "${CPP_CHANNEL}" \ - --channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \ conda/recipes/cugraph-dgl rapids-upload-conda-to-s3 python diff --git a/ci/run_cugraph_pyg_pytests.sh b/ci/run_cugraph_pyg_pytests.sh index fb27f16d..13fbca75 100755 --- a/ci/run_cugraph_pyg_pytests.sh +++ b/ci/run_cugraph_pyg_pytests.sh @@ -9,7 +9,7 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/cugraph-pyg/cugraph_ pytest --cache-clear --benchmark-disable "$@" . # Used to skip certain examples in CI due to memory limitations -export CI_RUN=1 +export CI=true # Test examples for e in "$(pwd)"/examples/*.py; do diff --git a/ci/test_wheel_cugraph-pyg.sh b/ci/test_wheel_cugraph-pyg.sh index 34654c43..97b725c6 100755 --- a/ci/test_wheel_cugraph-pyg.sh +++ b/ci/test_wheel_cugraph-pyg.sh @@ -32,9 +32,6 @@ python -m pip install \ # RAPIDS_DATASET_ROOT_DIR is used by test scripts export RAPIDS_DATASET_ROOT_DIR="$(realpath datasets)" -# Used to skip certain examples in CI due to memory limitations -export CI_RUN=1 - rapids-logger "pytest cugraph-pyg (single GPU)" pushd python/cugraph-pyg/cugraph_pyg python -m pytest \ diff --git a/python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_mnmg.py b/python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_mnmg.py index bb0252f8..1e19aa7d 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_mnmg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_mnmg.py @@ -348,7 +348,7 @@ def parse_args(): parser.add_argument("--batch_size", type=int, default=1024) parser.add_argument("--fan_out", type=int, default=30) parser.add_argument("--tempdir_root", type=str, default=None) - parser.add_argument("--dataset_root", type=str, default="dataset") + parser.add_argument("--dataset_root", type=str, default="datasets") parser.add_argument("--dataset", type=str, default="ogbn-products") parser.add_argument("--skip_partition", action="store_true") parser.add_argument("--wg_mem_type", type=str, default="distributed") diff --git a/python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_sg.py b/python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_sg.py index 0f9c39bf..223b58fb 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_sg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_sg.py @@ -156,7 +156,7 @@ def parse_args(): parser.add_argument("--batch_size", type=int, default=1024) parser.add_argument("--fan_out", type=int, default=30) parser.add_argument("--tempdir_root", type=str, default=None) - parser.add_argument("--dataset_root", type=str, default="dataset") + parser.add_argument("--dataset_root", type=str, default="datasets") parser.add_argument("--dataset", type=str, default="ogbn-products") parser.add_argument("--in_memory", action="store_true", default=False) parser.add_argument("--seeds_per_call", type=int, default=-1) @@ -173,7 +173,7 @@ def parse_args(): args.dataset, args.dataset_root ) - if "CI_RUN" in os.environ and os.environ["CI_RUN"] == "1": + if os.getenv("CI", "false").lower() == "true": warnings.warn("Pruning test dataset for CI run.") split_idx["test"] = split_idx["test"][:1000] diff --git a/python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_snmg.py b/python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_snmg.py index 56997dbf..42e33439 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_snmg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/gcn_dist_snmg.py @@ -261,7 +261,7 @@ def run_train( if __name__ == "__main__": - if "CI_RUN" in os.environ and os.environ["CI_RUN"] == "1": + if os.getenv("CI", "false").lower() == "true": warnings.warn("Skipping SMNG example in CI due to memory limit") else: parser = argparse.ArgumentParser() @@ -272,7 +272,7 @@ def run_train( parser.add_argument("--batch_size", type=int, default=1024) parser.add_argument("--fan_out", type=int, default=30) parser.add_argument("--tempdir_root", type=str, default=None) - parser.add_argument("--dataset_root", type=str, default="dataset") + parser.add_argument("--dataset_root", type=str, default="datasets") parser.add_argument("--dataset", type=str, default="ogbn-products") parser.add_argument("--in_memory", action="store_true", default=False) parser.add_argument("--seeds_per_call", type=int, default=-1) diff --git a/python/cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_mnmg.py b/python/cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_mnmg.py index 3c54b8e3..8566ad71 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_mnmg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_mnmg.py @@ -148,7 +148,7 @@ def parse_args(): parser.add_argument("--num_pos", type=int, default=-1) parser.add_argument("--fan_out", type=int, default=10) parser.add_argument("--dataset", type=str, default="ogbl-wikikg2") - parser.add_argument("--dataset_root", type=str, default="dataset") + parser.add_argument("--dataset_root", type=str, default="datasets") parser.add_argument("--seeds_per_call", type=int, default=-1) parser.add_argument("--n_devices", type=int, default=-1) parser.add_argument("--skip_partition", action="store_true") diff --git a/python/cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_sg.py b/python/cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_sg.py index 67d7eecc..6823fe72 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_sg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_sg.py @@ -155,7 +155,7 @@ def parse_args(): parser.add_argument("--num_neg", type=int, default=500) parser.add_argument("--fan_out", type=int, default=10) parser.add_argument("--dataset", type=str, default="ogbl-wikikg2") - parser.add_argument("--dataset_root", type=str, default="dataset") + parser.add_argument("--dataset_root", type=str, default="datasets") parser.add_argument("--seeds_per_call", type=int, default=-1) return parser.parse_args() diff --git a/python/cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_snmg.py b/python/cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_snmg.py index ec7174ca..131dfeab 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_snmg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/rgcn_link_class_snmg.py @@ -183,7 +183,7 @@ def parse_args(): parser.add_argument("--num_pos", type=int, default=-1) parser.add_argument("--fan_out", type=int, default=10) parser.add_argument("--dataset", type=str, default="ogbl-wikikg2") - parser.add_argument("--dataset_root", type=str, default="dataset") + parser.add_argument("--dataset_root", type=str, default="datasets") parser.add_argument("--seeds_per_call", type=int, default=-1) parser.add_argument("--n_devices", type=int, default=-1) @@ -273,7 +273,7 @@ def get_eval_loader(stage: str): if __name__ == "__main__": - if "CI_RUN" in os.environ and os.environ["CI_RUN"] == "1": + if os.getenv("CI", "false").lower() == "true": warnings.warn("Skipping SMNG example in CI due to memory limit") else: args = parse_args() From e6c07fa733978e1e20f533b7477570a2fc6c1df4 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 29 Oct 2024 13:17:20 -0700 Subject: [PATCH 18/18] more dataset to datasets --- .../cugraph_pyg/examples/cugraph_dist_sampling_mg.py | 2 +- .../cugraph_pyg/examples/cugraph_dist_sampling_sg.py | 2 +- python/cugraph-pyg/cugraph_pyg/examples/graph_sage_mg.py | 2 +- python/cugraph-pyg/cugraph_pyg/examples/graph_sage_sg.py | 2 +- python/cugraph-pyg/cugraph_pyg/examples/pylibcugraph_mg.py | 2 +- python/cugraph-pyg/cugraph_pyg/examples/pylibcugraph_sg.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python/cugraph-pyg/cugraph_pyg/examples/cugraph_dist_sampling_mg.py b/python/cugraph-pyg/cugraph_pyg/examples/cugraph_dist_sampling_mg.py index 31cbaf69..c9139a61 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/cugraph_dist_sampling_mg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/cugraph_dist_sampling_mg.py @@ -89,7 +89,7 @@ def main(): world_size = torch.cuda.device_count() uid = cugraph_comms_create_unique_id() - dataset = NodePropPredDataset("ogbn-products") + dataset = NodePropPredDataset("ogbn-products", root="datasets") el = dataset[0][0]["edge_index"].astype("int64") with tempfile.TemporaryDirectory() as directory: diff --git a/python/cugraph-pyg/cugraph_pyg/examples/cugraph_dist_sampling_sg.py b/python/cugraph-pyg/cugraph_pyg/examples/cugraph_dist_sampling_sg.py index de45acc7..e1016bf2 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/cugraph_dist_sampling_sg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/cugraph_dist_sampling_sg.py @@ -63,7 +63,7 @@ def sample(edgelist, directory): def main(): - dataset = NodePropPredDataset("ogbn-products") + dataset = NodePropPredDataset("ogbn-products", root="datasets") el = dataset[0][0]["edge_index"].astype("int64") with tempfile.TemporaryDirectory() as directory: diff --git a/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_mg.py b/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_mg.py index 145675c8..cdc1ba10 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_mg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_mg.py @@ -178,7 +178,7 @@ def train( else: if download_event.wait(timeout=1000): print(f"Rank {rank} loading dataset") - dataset = NodePropPredDataset(name="ogbn-mag") + dataset = NodePropPredDataset(name="ogbn-mag", root="datasets") data = dataset[0] print(f"Rank {rank} loaded dataset successfully") diff --git a/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_sg.py b/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_sg.py index e0169ee2..29f3f04b 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_sg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/graph_sage_sg.py @@ -79,7 +79,7 @@ def train(device: int, features_device: Union[str, int] = "cpu", num_epochs=2) - from ogb.nodeproppred import NodePropPredDataset - dataset = NodePropPredDataset(name="ogbn-mag") + dataset = NodePropPredDataset(name="ogbn-mag", root="datasets") data = dataset[0] G = data[0]["edge_index_dict"] diff --git a/python/cugraph-pyg/cugraph_pyg/examples/pylibcugraph_mg.py b/python/cugraph-pyg/cugraph_pyg/examples/pylibcugraph_mg.py index 832c5ec7..706d1e76 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/pylibcugraph_mg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/pylibcugraph_mg.py @@ -86,7 +86,7 @@ def main(): world_size = torch.cuda.device_count() uid = cugraph_comms_create_unique_id() - dataset = NodePropPredDataset("ogbn-products") + dataset = NodePropPredDataset("ogbn-products", root="datasets") el = dataset[0][0]["edge_index"].astype("int64") tmp.spawn( diff --git a/python/cugraph-pyg/cugraph_pyg/examples/pylibcugraph_sg.py b/python/cugraph-pyg/cugraph_pyg/examples/pylibcugraph_sg.py index 2f273ee5..f8fc42a1 100644 --- a/python/cugraph-pyg/cugraph_pyg/examples/pylibcugraph_sg.py +++ b/python/cugraph-pyg/cugraph_pyg/examples/pylibcugraph_sg.py @@ -57,7 +57,7 @@ def calc_degree(edgelist): def main(): - dataset = NodePropPredDataset("ogbn-products") + dataset = NodePropPredDataset("ogbn-products", root="datasets") el = dataset[0][0]["edge_index"].astype("int64") calc_degree(el)