Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ commands:
command: |
our_upload_channel=nightly
# On tags upload to test instead
if [[ -n "${CIRCLE_TAG}" ]]; then
if [[ -n "${CIRCLE_TAG}" ]] || [[ ${CIRCLE_BRANCH} =~ release/* ]]; then
our_upload_channel=test
fi
echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV}
Expand Down Expand Up @@ -75,6 +75,7 @@ jobs:
resource_class: 2xlarge+
steps:
- checkout
- designate_upload_channel
- run: packaging/build_wheel.sh
- store_artifacts:
path: dist
Expand All @@ -90,6 +91,7 @@ jobs:
resource_class: 2xlarge+
steps:
- checkout
- designate_upload_channel
- run: packaging/build_conda.sh
- store_artifacts:
path: /opt/conda/conda-bld/linux-64
Expand All @@ -104,6 +106,7 @@ jobs:
name: windows-cpu
steps:
- checkout
- designate_upload_channel
- run:
name: build
command: |
Expand All @@ -123,6 +126,7 @@ jobs:
name: windows-cpu
steps:
- checkout
- designate_upload_channel
- run:
name: build
command: |
Expand All @@ -144,6 +148,7 @@ jobs:
xcode: "9.4.1"
steps:
- checkout
- designate_upload_channel
- run:
# Installing cmake with `brew install cmake` takes 30 mins, so we use binary distribution.
command: |
Expand All @@ -169,6 +174,7 @@ jobs:
xcode: "9.4.1"
steps:
- checkout
- designate_upload_channel
- run:
command: |
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
Expand Down Expand Up @@ -196,7 +202,7 @@ jobs:
# Prevent credential from leaking
conda install -yq anaconda-client
set -x
anaconda -t "${CONDA_PYTORCHBOT_TOKEN}" upload ~/workspace/conda-bld/*/*.tar.bz2 -u pytorch-nightly --label main --no-progress --force
anaconda -t "${CONDA_PYTORCHBOT_TOKEN}" upload ~/workspace/conda-bld/*/*.tar.bz2 -u "pytorch-${UPLOAD_CHANNEL}" --label main --no-progress --force

# Requires org-member context
binary_wheel_upload:
Expand All @@ -217,7 +223,7 @@ jobs:
export AWS_SECRET_ACCESS_KEY="${PYTORCH_BINARY_AWS_SECRET_ACCESS_KEY}"
set -x
for pkg in ~/workspace/*.whl; do
aws s3 cp "$pkg" "s3://pytorch/whl/nightly/" --acl public-read
aws s3 cp "$pkg" "s3://pytorch/whl/${UPLOAD_CHANNEL}/" --acl public-read
done

smoke_test_linux_conda:
Expand All @@ -244,12 +250,13 @@ jobs:
steps:
- attach_workspace:
at: ~/workspace
- designate_upload_channel
- run:
name: install binaries
command: |
set -x
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
pip install $(ls ~/workspace/torchtext*.whl) --pre -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
pip install $(ls ~/workspace/torchtext*.whl) --pre -f "https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/cpu/torch_${UPLOAD_CHANNEL}.html"
- run:
name: smoke test
command: |
Expand Down Expand Up @@ -283,6 +290,7 @@ jobs:
steps:
- attach_workspace:
at: ~/workspace
- designate_upload_channel
- run:
name: install binaries
command: |
Expand All @@ -291,7 +299,7 @@ jobs:
conda env remove -n python${PYTHON_VERSION} || true
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION}
conda install -v -y -c pytorch-nightly pytorch
conda install -v -y -c pytorch-"${UPLOAD_CHANNEL}" pytorch
conda install -v -y -c ~/workspace/conda-bld torchtext
- run:
name: smoke test
Expand All @@ -307,6 +315,7 @@ jobs:
steps:
- attach_workspace:
at: ~/workspace
- designate_upload_channel
- run:
name: install binaries
command: |
Expand All @@ -315,7 +324,7 @@ jobs:
conda env remove -n python${PYTHON_VERSION} || true
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION}
pip install $(ls ~/workspace/torchtext*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html
pip install $(ls ~/workspace/torchtext*.whl) --pre -f "https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/torch_${UPLOAD_CHANNEL}.html"
- run:
name: smoke test
command: |
Expand All @@ -330,6 +339,7 @@ jobs:
resource_class: 2xlarge+
steps:
- checkout
- designate_upload_channel
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
Expand Down Expand Up @@ -381,6 +391,7 @@ jobs:
name: windows-cpu
steps:
- checkout
- designate_upload_channel
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
Expand Down Expand Up @@ -433,6 +444,7 @@ jobs:
resource_class: medium
steps:
- checkout
- designate_upload_channel
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
Expand Down
24 changes: 18 additions & 6 deletions .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ commands:
command: |
our_upload_channel=nightly
# On tags upload to test instead
if [[ -n "${CIRCLE_TAG}" ]]; then
if [[ -n "${CIRCLE_TAG}" ]] || [[ ${CIRCLE_BRANCH} =~ release/* ]]; then
our_upload_channel=test
fi
echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV}
Expand Down Expand Up @@ -75,6 +75,7 @@ jobs:
resource_class: 2xlarge+
steps:
- checkout
- designate_upload_channel
- run: packaging/build_wheel.sh
- store_artifacts:
path: dist
Expand All @@ -90,6 +91,7 @@ jobs:
resource_class: 2xlarge+
steps:
- checkout
- designate_upload_channel
- run: packaging/build_conda.sh
- store_artifacts:
path: /opt/conda/conda-bld/linux-64
Expand All @@ -104,6 +106,7 @@ jobs:
name: windows-cpu
steps:
- checkout
- designate_upload_channel
- run:
name: build
command: |
Expand All @@ -123,6 +126,7 @@ jobs:
name: windows-cpu
steps:
- checkout
- designate_upload_channel
- run:
name: build
command: |
Expand All @@ -144,6 +148,7 @@ jobs:
xcode: "9.4.1"
steps:
- checkout
- designate_upload_channel
- run:
# Installing cmake with `brew install cmake` takes 30 mins, so we use binary distribution.
command: |
Expand All @@ -169,6 +174,7 @@ jobs:
xcode: "9.4.1"
steps:
- checkout
- designate_upload_channel
- run:
command: |
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
Expand Down Expand Up @@ -196,7 +202,7 @@ jobs:
# Prevent credential from leaking
conda install -yq anaconda-client
set -x
anaconda -t "${CONDA_PYTORCHBOT_TOKEN}" upload ~/workspace/conda-bld/*/*.tar.bz2 -u pytorch-nightly --label main --no-progress --force
anaconda -t "${CONDA_PYTORCHBOT_TOKEN}" upload ~/workspace/conda-bld/*/*.tar.bz2 -u "pytorch-${UPLOAD_CHANNEL}" --label main --no-progress --force

# Requires org-member context
binary_wheel_upload:
Expand All @@ -217,7 +223,7 @@ jobs:
export AWS_SECRET_ACCESS_KEY="${PYTORCH_BINARY_AWS_SECRET_ACCESS_KEY}"
set -x
for pkg in ~/workspace/*.whl; do
aws s3 cp "$pkg" "s3://pytorch/whl/nightly/" --acl public-read
aws s3 cp "$pkg" "s3://pytorch/whl/${UPLOAD_CHANNEL}/" --acl public-read
done

smoke_test_linux_conda:
Expand All @@ -244,12 +250,13 @@ jobs:
steps:
- attach_workspace:
at: ~/workspace
- designate_upload_channel
- run:
name: install binaries
command: |
set -x
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
pip install $(ls ~/workspace/torchtext*.whl) --pre -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
pip install $(ls ~/workspace/torchtext*.whl) --pre -f "https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/cpu/torch_${UPLOAD_CHANNEL}.html"
- run:
name: smoke test
command: |
Expand Down Expand Up @@ -283,6 +290,7 @@ jobs:
steps:
- attach_workspace:
at: ~/workspace
- designate_upload_channel
- run:
name: install binaries
command: |
Expand All @@ -291,7 +299,7 @@ jobs:
conda env remove -n python${PYTHON_VERSION} || true
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION}
conda install -v -y -c pytorch-nightly pytorch
conda install -v -y -c pytorch-"${UPLOAD_CHANNEL}" pytorch
conda install -v -y -c ~/workspace/conda-bld torchtext
- run:
name: smoke test
Expand All @@ -307,6 +315,7 @@ jobs:
steps:
- attach_workspace:
at: ~/workspace
- designate_upload_channel
- run:
name: install binaries
command: |
Expand All @@ -315,7 +324,7 @@ jobs:
conda env remove -n python${PYTHON_VERSION} || true
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION}
pip install $(ls ~/workspace/torchtext*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html
pip install $(ls ~/workspace/torchtext*.whl) --pre -f "https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/torch_${UPLOAD_CHANNEL}.html"
- run:
name: smoke test
command: |
Expand All @@ -330,6 +339,7 @@ jobs:
resource_class: 2xlarge+
steps:
- checkout
- designate_upload_channel
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
Expand Down Expand Up @@ -381,6 +391,7 @@ jobs:
name: windows-cpu
steps:
- checkout
- designate_upload_channel
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
Expand Down Expand Up @@ -433,6 +444,7 @@ jobs:
resource_class: medium
steps:
- checkout
- designate_upload_channel
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
Expand Down
4 changes: 2 additions & 2 deletions packaging/pkg_helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ setup_pip_pytorch_version() {
else
pip_install "torch==$PYTORCH_VERSION$PYTORCH_VERSION_SUFFIX" \
-f https://download.pytorch.org/whl/torch_stable.html \
-f https://download.pytorch.org/whl/nightly/torch_nightly.html
-f "https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/torch_${UPLOAD_CHANNEL}.html"
fi
}

Expand All @@ -186,7 +186,7 @@ setup_conda_pytorch_constraint() {
export CONDA_CHANNEL_FLAGS="-c pytorch-nightly"
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="-c pytorch -c pytorch-nightly"
export CONDA_CHANNEL_FLAGS="-c pytorch -c pytorch-${UPLOAD_CHANNEL}"
fi
if [[ "$CU_VERSION" == cpu ]]; then
export CONDA_PYTORCH_BUILD_CONSTRAINT="- pytorch==$PYTORCH_VERSION${PYTORCH_VERSION_SUFFIX}"
Expand Down