-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create cugraph-equivariant
package
#4036
Changes from 18 commits
a859eee
b35b307
38d8429
d2186ee
148cb4e
15404b5
3c58d7c
834c1ba
d27a42b
43b97b8
1f4077a
6462cc3
2259a8d
c525bef
78fc221
3fd56dc
924e55b
0a9c4b8
9547bd5
b9ce1ca
4457eff
65ceca3
f848852
c0abf8c
40b972c
6dff47a
3ee809b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,8 @@ jobs: | |
- wheel-tests-cugraph-dgl | ||
- wheel-build-cugraph-pyg | ||
- wheel-tests-cugraph-pyg | ||
- wheel-build-cugraph-equivariant | ||
- wheel-tests-cugraph-equivariant | ||
- devcontainer | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
|
@@ -161,6 +163,20 @@ jobs: | |
build_type: pull-request | ||
script: ci/test_wheel_cugraph-pyg.sh | ||
matrix_filter: map(select(.ARCH == "amd64" and .CUDA_VER == "11.8.0")) | ||
wheel-build-cugraph-equivariant: | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
script: ci/build_wheel_cugraph-equivariant.sh | ||
wheel-tests-cugraph-equivariant: | ||
needs: wheel-build-cugraph-equivariant | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
script: ci/test_wheel_cugraph-equivariant.sh | ||
matrix_filter: map(select(.ARCH == "amd64")) | ||
devcontainer: | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
|
||
set -euo pipefail | ||
|
||
./ci/build_wheel.sh cugraph-equivariant python/cugraph-equivariant |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
|
||
set -eoxu pipefail | ||
|
||
package_name="cugraph-equivariant" | ||
package_dir="python/cugraph-equivariant" | ||
|
||
python_package_name=$(echo ${package_name}|sed 's/-/_/g') | ||
|
||
mkdir -p ./dist | ||
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" | ||
|
||
# use 'ls' to expand wildcard before adding `[extra]` requires for pip | ||
RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist | ||
# pip creates wheels using python package names | ||
python -m pip install $(ls ./dist/${python_package_name}*.whl)[test] | ||
|
||
|
||
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 | ||
PYTORCH_CUDA_VER="121" | ||
else | ||
PYTORCH_CUDA_VER=$PKG_CUDA_VER | ||
fi | ||
PYTORCH_URL="https://download.pytorch.org/whl/cu${PYTORCH_CUDA_VER}" | ||
|
||
rapids-logger "Installing PyTorch and e3nn" | ||
rapids-retry python -m pip install torch --index-url ${PYTORCH_URL} | ||
rapids-retry python -m pip install e3nn | ||
|
||
python -m pytest python/cugraph-equivariant/cugraph_equivariant/tests |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
|
||
# This assumes the script is executed from the root of the repo directory | ||
|
||
./build.sh cugraph-equivariant |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
|
||
{% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') + environ.get('VERSION_SUFFIX', '') %} | ||
{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} | ||
{% set py_version = environ['CONDA_PY'] %} | ||
{% set date_string = environ['RAPIDS_DATE_STRING'] %} | ||
|
||
package: | ||
name: cugraph-equivariant | ||
version: {{ version }} | ||
|
||
source: | ||
path: ../../.. | ||
|
||
build: | ||
number: {{ GIT_DESCRIBE_NUMBER }} | ||
build: | ||
number: {{ GIT_DESCRIBE_NUMBER }} | ||
string: py{{ py_version }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} | ||
|
||
requirements: | ||
host: | ||
- python | ||
run: | ||
- pylibcugraphops ={{ minor_version }} | ||
- python | ||
|
||
tests: | ||
imports: | ||
- cugraph_equivariant | ||
|
||
about: | ||
home: https://rapids.ai/ | ||
dev_url: https://github.com/rapidsai/cugraph | ||
license: Apache-2.0 | ||
license_file: ../../../LICENSE | ||
summary: GPU-accelerated equivariant convolutional layers. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../LICENSE |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# cugraph-equivariant | ||
|
||
## Description | ||
|
||
cugraph-equivariant library provides fast symmetry-preserving (equivariant) operations and convolutional layers, to accelerate the equivariant neural networks in drug discovery and other domains. | ||
|
||
## Build from source | ||
|
||
Developers are suggested to create a conda environment that includes the runtime and test dependencies and pip install `cugraph-equivariant` in an editable mode. | ||
|
||
```bash | ||
# for cuda 11.8 | ||
mamba env create -n cugraph_equivariant -f python/cugraph-equivariant/conda/cugraph_equivariant_dev_cuda-118_arch-x86_64.yaml | ||
conda activate cugraph_equivariant | ||
./build_component.sh -n cugraph-equivariant | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../VERSION |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from cugraph_equivariant._version import __git_commit__, __version__ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
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 module 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_equivariant") | ||
.joinpath("VERSION") | ||
.read_text() | ||
.strip() | ||
) | ||
__git_commit__ = "" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from .tensor_product_conv import FullyConnectedTensorProductConv | ||
|
||
DiffDockTensorProductConv = FullyConnectedTensorProductConv | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this alias? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is from one of our discussions on Monday, but it's totally optional. @mariogeiger Do you think we need the alias? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for me, the name |
||
|
||
__all__ = [ | ||
"FullyConnectedTensorProductConv", | ||
"DiffDockTensorProductConv", | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, but would this be better off as a dependency in the
py_test_cugraph_equivariant
section of thedependencies.yaml
file?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally yes, but
e3nn
depends on PyTorch. Having that in pyproject.toml might pull wrong versions of pytorch for users. cugraph-dgl and -pyg's pyproject.toml does not have pytorch either (I guess for the same reason).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tingyu66 do you want me to remove pytorch from the dependencies of e3nn?