Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
nightly versions
Browse files Browse the repository at this point in the history
  • Loading branch information
divyegala committed Oct 13, 2023
1 parent 01ad40f commit ec6b6bb
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 11 deletions.
4 changes: 3 additions & 1 deletion ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ export CMAKE_GENERATOR=Ninja

rapids-print-env

version=$(rapids-generate-version)

rapids-logger "Begin cpp build"

rapids-conda-retry mambabuild conda/recipes/libwholegraph
RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild conda/recipes/libwholegraph

rapids-upload-conda-to-s3 cpp
10 changes: 10 additions & 0 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ PACKAGES="libwholegraph"

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)

version=$(rapids-generate-version)
git_commit=$(git rev-parse HEAD)
export RAPIDS_PACKAGE_VERSION=${version}

version_file_libwholegraph="python/libwholegraph/libwholegraph/_version.py"
sed -i "/^__version__/ s/= .*/= ${version}/g" ${version_file_libwholegraph}
sed -i "/^__git_commit__/ s/= .*/= \"${git_commit}\"/g" ${version_file_libwholegraph}
rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
"${PACKAGES}"
Expand All @@ -22,6 +29,9 @@ rapids-logger "Begin py build"
# TODO: Remove `--no-test` flags once importing on a CPU
# node works correctly
rapids-logger "Begin pylibwholegraph build"
version_file_pylibwholegraph="python/pylibwholegraph/pylibwholegraph/_version.py"
sed -i "/^__version__/ s/= .*/= ${version}/g" ${version_file_pylibwholegraph}
sed -i "/^__git_commit__/ s/= .*/= \"${git_commit}\"/g" ${version_file_pylibwholegraph}
rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
Expand Down
9 changes: 5 additions & 4 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ package_dir="python/pylibwholegraph"
source rapids-configure-sccache
source rapids-date-string

# Use gha-tools rapids-pip-wheel-version to generate wheel version then
# update the necessary files
version_override="$(rapids-pip-wheel-version ${RAPIDS_DATE_STRING})"
version=$(rapids-generate-version)
git_commit=$(git rev-parse HEAD)

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

Expand All @@ -21,9 +20,11 @@ PACKAGE_CUDA_SUFFIX="-${RAPIDS_PY_CUDA_SUFFIX}"

# Patch project metadata files to include the CUDA version suffix and version override.
pyproject_file="${package_dir}/pyproject.toml"
version_file="${package_dir}/${package_name}/_version.py"

sed -i "s/^version = .*/version = \"${version_override}\"/g" ${pyproject_file}
sed -i "s/name = \"${package_name}\"/name = \"${package_name}${PACKAGE_CUDA_SUFFIX}\"/g" ${pyproject_file}
sed -i "/^__version__ / s/= .*/= ${version}/g" ${version_file}
sed -i "/^__git_commit__ / s/= .*/= \"${git_commit}\"/g" ${version_file}

# For nightlies we want to ensure that we're pulling in alphas as well. The
# easiest way to do so is to augment the spec with a constraint containing a
Expand Down
4 changes: 2 additions & 2 deletions conda/recipes/libwholegraph/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2019-2023, NVIDIA CORPORATION.

{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %}
{% set version = environ.get('RAPIDS_PACKAGE_VERSION', '0.0.0.dev').strip('"').lstrip('v') + environ.get('VERSION_SUFFIX', '') %}
{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %}
{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %}
{% set cuda_major = cuda_version.split('.')[0] %}
Expand All @@ -11,7 +11,7 @@ package:
name: libwholegraph-split

source:
git_url: ../../..
path: ../../..

build:
script_env:
Expand Down
4 changes: 2 additions & 2 deletions conda/recipes/pylibwholegraph/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2022-2023, NVIDIA CORPORATION.

{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %}
{% set version = environ.get('RAPIDS_PACKAGE_VERSION', '0.0.0.dev').strip('"').lstrip('v') + environ.get('VERSION_SUFFIX', '') %}
{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %}
{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %}
{% set cuda_major = cuda_version.split('.')[0] %}
Expand All @@ -12,7 +12,7 @@ package:
version: {{ version }}

source:
git_url: ../../..
path: ../../..

build:
number: {{ GIT_DESCRIBE_NUMBER }}
Expand Down
2 changes: 1 addition & 1 deletion python/pylibwholegraph/pylibwholegraph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "23.12.00"
from pylibwholegraph._version import __git_commit__, __version__
18 changes: 18 additions & 0 deletions python/pylibwholegraph/pylibwholegraph/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2023, 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.
#

# Version configuration
__version__ = "23.12.00"
__git_commit__ = ""
5 changes: 4 additions & 1 deletion python/pylibwholegraph/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ requires = [

[project]
name = "pylibwholegraph"
version = "23.12.00"
dynamic = ["version"]
description = "pylibwholegraph - GPU Graph Storage for GNN feature and graph structure"
authors = [
{ name = "NVIDIA Corporation" },
Expand All @@ -45,3 +45,6 @@ classifiers = [

[tool.setuptools]
license-files = ["LICENSE"]

[tool.setuptools.dynamic]
version = {attr = "pylibwholegraph._version.__version__"}

0 comments on commit ec6b6bb

Please sign in to comment.