From 0d207a7d95dd28afb96c9a33f48a6773aad9a69d Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 6 Oct 2022 10:54:13 -0700 Subject: [PATCH 1/2] Test against torch RC instead of nightly Fix prev commit --- .circleci/config.yml | 12 ++++-------- .circleci/config.yml.in | 12 ++++-------- packaging/pkg_helpers.bash | 6 +++--- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 69ac69332df..640279d8968 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,11 +39,7 @@ commands: - run: name: adding UPLOAD_CHANNEL to BASH_ENV command: | - our_upload_channel=nightly - # On tags upload to test instead - if [[ -n "${CIRCLE_TAG}" ]]; then - our_upload_channel=test - fi + our_upload_channel=test echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV} brew_update: @@ -146,7 +142,7 @@ commands: default: true steps: - pip_install: - args: --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu + args: --pre torch -f https://download.pytorch.org/whl/test/cpu/torch_test.html descr: Install PyTorch from nightly releases - pip_install: args: --no-build-isolation <<# parameters.editable >> --editable <> . @@ -634,7 +630,7 @@ jobs: set -x source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - pip_install: - args: $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html + args: $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/test/torch_test.html - run: name: smoke test command: | @@ -703,7 +699,7 @@ jobs: conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} - pip_install: - args: $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html + args: $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/test/torch_test.html - run: name: smoke test command: | diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index 829a21568d5..d0d3ccc4603 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -39,11 +39,7 @@ commands: - run: name: adding UPLOAD_CHANNEL to BASH_ENV command: | - our_upload_channel=nightly - # On tags upload to test instead - if [[ -n "${CIRCLE_TAG}" ]]; then - our_upload_channel=test - fi + our_upload_channel=test echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV} brew_update: @@ -146,7 +142,7 @@ commands: default: true steps: - pip_install: - args: --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu + args: --pre torch -f https://download.pytorch.org/whl/test/cpu/torch_test.html descr: Install PyTorch from nightly releases - pip_install: args: --no-build-isolation <<# parameters.editable >> --editable <> . @@ -634,7 +630,7 @@ jobs: set -x source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION} - pip_install: - args: $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html + args: $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/test/torch_test.html - run: name: smoke test command: | @@ -703,7 +699,7 @@ jobs: conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} - pip_install: - args: $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html + args: $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/test/torch_test.html - run: name: smoke test command: | diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index 758b712ea1f..195bc3a4561 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -191,7 +191,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/nightly/${WHEEL_DIR}torch_nightly.html" + pip_install --pre torch -f "https://download.pytorch.org/whl/test/${WHEEL_DIR}torch_test.html" if [[ "$CUDA_VERSION" == "cpu" ]]; then # CUDA and CPU are ABI compatible on the CPU-only parts, so strip # in this case @@ -212,13 +212,13 @@ setup_pip_pytorch_version() { # You MUST have populated PYTORCH_VERSION_SUFFIX before hand. setup_conda_pytorch_constraint() { if [[ -z "$PYTORCH_VERSION" ]]; then - export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch-nightly -c pytorch" + export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch-test -c pytorch" 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-nightly]' | \ + export PYTORCH_VERSION="$(conda search --json 'pytorch[channel=pytorch-test]' | \ ${PYTHON} -c "import os, sys, json, re; cuver = os.environ.get('CU_VERSION'); \ cuver_1 = cuver.replace('cu', 'cuda') if cuver != 'cpu' else cuver; \ cuver_2 = (cuver[:-1] + '.' + cuver[-1]).replace('cu', 'cuda') if cuver != 'cpu' else cuver; \ From d670abd95cb5ecc34b1fa55ab8e03c9065285165 Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 6 Oct 2022 12:44:01 -0700 Subject: [PATCH 2/2] Bump version to build against Use UPLOAD_CHANNEL instead of hardcoding --- .circleci/config.yml | 4 ++-- .circleci/config.yml.in | 4 ++-- packaging/pkg_helpers.bash | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 640279d8968..e70cd4481e1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -190,11 +190,11 @@ binary_common: &binary_common build_version: description: "version number of release binary; by default, build a nightly" type: string - default: "" + default: "0.14.0" pytorch_version: description: "PyTorch version to build against; by default, use a nightly" type: string - default: "" + default: "1.13.0" # Don't edit these python_version: description: "Python version to build against (e.g., 3.7)" diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index d0d3ccc4603..e27dcd15073 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -190,11 +190,11 @@ binary_common: &binary_common build_version: description: "version number of release binary; by default, build a nightly" type: string - default: "" + default: "0.14.0" pytorch_version: description: "PyTorch version to build against; by default, use a nightly" type: string - default: "" + default: "1.13.0" # Don't edit these python_version: description: "Python version to build against (e.g., 3.7)" diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index 195bc3a4561..636f4f7a2a7 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -191,7 +191,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/${UPLOAD_CHANNEL}/${WHEEL_DIR}torch_${UPLOAD_CHANNEL}.html" if [[ "$CUDA_VERSION" == "cpu" ]]; then # CUDA and CPU are ABI compatible on the CPU-only parts, so strip # in this case @@ -212,13 +212,13 @@ setup_pip_pytorch_version() { # You MUST have populated PYTORCH_VERSION_SUFFIX before hand. setup_conda_pytorch_constraint() { if [[ -z "$PYTORCH_VERSION" ]]; then - export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch-test -c pytorch" + export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch-${UPLOAD_CHANNEL} -c pytorch" 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-test]' | \ + export PYTORCH_VERSION="$(conda search --json pytorch[channel=pytorch-${UPLOAD_CHANNEL}] | \ ${PYTHON} -c "import os, sys, json, re; cuver = os.environ.get('CU_VERSION'); \ cuver_1 = cuver.replace('cu', 'cuda') if cuver != 'cpu' else cuver; \ cuver_2 = (cuver[:-1] + '.' + cuver[-1]).replace('cu', 'cuda') if cuver != 'cpu' else cuver; \