Skip to content

Commit

Permalink
declare torch testing dependency for cugraph-dgl, combine pip install…
Browse files Browse the repository at this point in the history
…s again
  • Loading branch information
jameslamb committed Oct 21, 2024
1 parent 2ed9905 commit 802e46c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 21 deletions.
10 changes: 3 additions & 7 deletions ci/test_wheel_cugraph-dgl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 1 addition & 6 deletions ci/test_wheel_cugraph-pyg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]" \
Expand All @@ -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)"

Expand Down
9 changes: 2 additions & 7 deletions ci/test_wheel_pylibwholegraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions python/cugraph-pyg/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 802e46c

Please sign in to comment.