Skip to content

Commit

Permalink
Test against torch RC instead of nightly
Browse files Browse the repository at this point in the history
Fix prev commit
  • Loading branch information
atalman committed Oct 6, 2022
1 parent 3bd6ce9 commit 0d207a7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
12 changes: 4 additions & 8 deletions .circleci/config.yml

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

12 changes: 4 additions & 8 deletions .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 <</ parameters.editable >> .
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down
6 changes: 3 additions & 3 deletions packaging/pkg_helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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; \
Expand Down

0 comments on commit 0d207a7

Please sign in to comment.