Skip to content

Commit 0cd5228

Browse files
authored
Fix poetry and pypi validations when version is specified (#1622)
* test (#1617) Fix validations (#1618) * test * poetry_fix * test Fix validations (#1619) * test * poetry_fix * test * test * restrict
1 parent c3e0f55 commit 0cd5228

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

.github/scripts/validate_pipy.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@ conda create -yn ${ENV_NAME}_pypi python=${MATRIX_PYTHON_VERSION} numpy ffmpeg
22
conda activate ${ENV_NAME}_pypi
33

44
TEST_SUFFIX=""
5+
RELEASE_SUFFIX=""
6+
# if RELESE version is passed as parameter - install speific version
7+
if [[ ! -z ${RELEASE_VERSION} ]]; then
8+
RELEASE_SUFFIX="==${RELEASE_VERSION}"
9+
fi
10+
511
if [[ ${TORCH_ONLY} == 'true' ]]; then
612
TEST_SUFFIX=" --package torchonly"
7-
pip3 install --pre torch --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
13+
pip3 install --pre torch${RELEASE_SUFFIX} --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
814
else
915
if [[ ${MATRIX_CHANNEL} != "release" ]]; then
10-
pip3 install --pre torch --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
16+
pip3 install --pre torch${RELEASE_SUFFIX} --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
1117
pip3 install --pre torchvision torchaudio --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}"
1218
else
13-
pip3 install torch torchvision torchaudio
19+
pip3 install torch${RELEASE_SUFFIX} torchvision torchaudio
1420
fi
1521
fi
1622

.github/scripts/validate_poetry.sh

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,16 @@ if [[ ${TORCH_ONLY} == 'true' ]]; then
1313
TEST_SUFFIX=" --package torchonly"
1414
fi
1515

16-
if [[ ${MATRIX_CHANNEL} != "release" ]]; then
17-
# Installing poetry from our custom repo. We need to configure it before use and disable authentication
18-
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
19-
poetry source add --priority=explicit domains "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}"
20-
poetry source add --priority=supplemental pytorch-channel "https://download.pytorch.org/whl/${MATRIX_CHANNEL}"
21-
poetry source add --priority=supplemental pytorch "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
22-
poetry --quiet add --source pytorch torch
16+
RELEASE_SUFFIX=""
17+
# if RELESE version is passed as parameter - install speific version
18+
if [[ ! -z ${RELEASE_VERSION} ]]; then
19+
RELEASE_SUFFIX="@${RELEASE_VERSION}"
20+
fi
2321

24-
if [[ ${TORCH_ONLY} != 'true' ]]; then
25-
poetry --quiet add --source domains torchvision torchaudio
26-
fi
22+
if [[ ${TORCH_ONLY} == 'true' ]]; then
23+
poetry --quiet add torch${RELEASE_SUFFIX}
2724
else
28-
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
29-
poetry source add --priority=explicit pytorch "https://download.pytorch.org/whl/${MATRIX_DESIRED_CUDA}"
30-
if [[ ${TORCH_ONLY} == 'true' ]]; then
31-
poetry --quiet add torch
32-
else
33-
poetry --quiet add --source pytorch torch torchaudio torchvision
34-
fi
25+
poetry --quiet add torch${RELEASE_SUFFIX} torchaudio torchvision
3526
fi
3627

3728
python ../test/smoke_test/smoke_test.py ${TEST_SUFFIX} --runtime-error-check disabled

.github/workflows/validate-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
ref: ${{ inputs.ref || github.ref }}
115115
torchonly: ${{ inputs.torchonly }}
116116
version: ${{ inputs.version }}
117-
release-matrix: ${{ needs.generate-rlease-matrix.outputs.matrix }}
117+
release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }}
118118

119119
mac-arm64:
120120
if: inputs.os == 'macos' || inputs.os == 'all'

.github/workflows/validate-linux-binaries.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ jobs:
9393
# Special case PyPi installation package. And Install of PyPi package via poetry
9494
if [[ ${MATRIX_PACKAGE_TYPE} == "manywheel" && ${MATRIX_GPU_ARCH_VERSION} == "12.1" ]]; then
9595
source ./.github/scripts/validate_pipy.sh
96-
source ./.github/scripts/validate_poetry.sh
96+
97+
if [[ ${MATRIX_CHANNEL} == "release" ]]; then
98+
source ./.github/scripts/validate_poetry.sh
99+
fi
97100
fi
98101
99102
# Standart case: Validate binaries

0 commit comments

Comments
 (0)