Skip to content

Commit

Permalink
Revert "Version Bumps and Update channels (#2067)"
Browse files Browse the repository at this point in the history
This reverts commit d25b3ef.
  • Loading branch information
atalman committed Feb 17, 2023
1 parent d25b3ef commit 1c84b6e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
14 changes: 9 additions & 5 deletions .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ commands:
- run:
name: adding UPLOAD_CHANNEL to BASH_ENV
command: |
# hardcoded upload channel for release
echo "export UPLOAD_CHANNEL=test" >> ${BASH_ENV}
our_upload_channel=nightly
# On tags upload to test instead
if [[ -n "${CIRCLE_TAG}" ]] || [[ ${CIRCLE_BRANCH} =~ release/* ]]; then
our_upload_channel=test
fi
echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV}
load_conda_channel_flags:
description: "Determines whether we need extra conda channels"
steps:
Expand All @@ -39,15 +43,15 @@ binary_common: &binary_common
build_version:
description: "version number of release binary; by default, build a nightly"
type: string
default: "0.15.0"
default: ""
pytorch_version:
description: "PyTorch version to build against; by default, use a nightly"
type: string
default: "2.0.0"
default: ""
torchdata_version:
description: "TorchData version to build against; by default, use a nightly"
type: string
default: "0.6.0"
default: ""
# Don't edit these
python_version:
description: "Python version to build against (e.g., 3.8)"
Expand Down
10 changes: 5 additions & 5 deletions packaging/pkg_helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ setup_pip_pytorch_version() {
if [[ -z "$PYTORCH_VERSION" ]]; then
# Install latest prerelease version of torch, per our nightlies, consistent
# with the requested cuda version
pip_install --pre torch -f "https://download.pytorch.org/whl/test/${WHEEL_DIR}torch_test.html"
pip_install --pre torch -f "https://download.pytorch.org/whl/nightly/${WHEEL_DIR}torch_nightly.html"
# CUDA and CPU are ABI compatible on the CPU-only parts, so strip
# in this case
export PYTORCH_VERSION="$(pip show torch | grep ^Version: | sed 's/Version: *//' | sed 's/+.\+//')"
Expand All @@ -191,7 +191,7 @@ setup_pip_pytorch_version() {
-f "https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/torch_${UPLOAD_CHANNEL}.html"
fi
if [[ -z "$TORCHDATA_VERSION" ]]; then
pip_install --pre torchdata -f "https://download.pytorch.org/whl/test/cpu/torch_test.html"
pip_install --pre torchdata -f "https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html"
export TORCHDATA_VERSION="$(pip show torchdata | grep ^Version: | sed 's/Version: *//' | sed 's/+.\+//')"
else
pip_install "torchdata==$TORCHDATA_VERSION" \
Expand All @@ -207,13 +207,13 @@ setup_pip_pytorch_version() {
setup_conda_pytorch_constraint() {
CONDA_CHANNEL_FLAGS=${CONDA_CHANNEL_FLAGS:-}
if [[ -z "$PYTORCH_VERSION" ]]; then
export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch-${UPLOAD_CHANNEL}"
export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch-nightly"
PYTHON="python"
# Check if we have python 3 instead and prefer that
if python3 --version >/dev/null 2>/dev/null; then
PYTHON="python3"
fi
export PYTORCH_VERSION="$(conda search --json pytorch[channel=pytorch-${UPLOAD_CHANNEL}] | ${PYTHON} -c "import sys, json, re; print(re.sub(r'\\+.*$', '', json.load(sys.stdin)['pytorch'][-1]['version']))")"
export PYTORCH_VERSION="$(conda search --json 'pytorch[channel=pytorch-nightly]' | ${PYTHON} -c "import sys, json, re; print(re.sub(r'\\+.*$', '', json.load(sys.stdin)['pytorch'][-1]['version']))")"
else
export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch -c pytorch-${UPLOAD_CHANNEL}"
fi
Expand All @@ -233,7 +233,7 @@ setup_conda_pytorch_constraint() {
fi
fi
if [[ -z "$TORCHDATA_VERSION" ]]; then
export TORCHDATA_VERSION="$(conda search --json 'torchdata[channel=pytorch-test]' | ${PYTHON} -c "import sys, json, re; print(re.sub(r'\\+.*$', '', json.load(sys.stdin)['torchdata'][-1]['version']))")"
export TORCHDATA_VERSION="$(conda search --json 'torchdata[channel=pytorch-nightly]' | ${PYTHON} -c "import sys, json, re; print(re.sub(r'\\+.*$', '', json.load(sys.stdin)['torchdata'][-1]['version']))")"
fi
export CONDA_TORCHDATA_CONSTRAINT="- torchdata==$TORCHDATA_VERSION"
}
Expand Down

0 comments on commit 1c84b6e

Please sign in to comment.