Skip to content

Commit 10f5379

Browse files
authored
Validate poetry workflow (#1511)
1 parent fe02df7 commit 10f5379

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

.github/scripts/validate_poetry.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,32 @@ poetry --version
88
poetry new test_poetry
99
cd test_poetry
1010

11+
TEST_SUFFIX=""
12+
if [[ ${TORCH_ONLY} == 'true' ]]; then
13+
TEST_SUFFIX=" --package torchonly"
14+
else
15+
1116
if [[ ${MATRIX_CHANNEL} != "release" ]]; then
1217
# Installing poetry from our custom repo. We need to configure it before use and disable authentication
1318
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
1419
poetry source add --priority=explicit domains "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}"
15-
poetry source add --priority=supplemental pytorch-nightly "https://download.pytorch.org/whl/${MATRIX_CHANNEL}"
20+
poetry source add --priority=supplemental pytorch-channel "https://download.pytorch.org/whl/${MATRIX_CHANNEL}"
1621
poetry source add --priority=supplemental pytorch "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
1722
poetry --quiet add --source pytorch torch
18-
poetry --quiet add --source domains torchvision torchaudio
23+
24+
if [[ ${TORCH_ONLY} != 'true' ]]; then
25+
poetry --quiet add --source domains torchvision torchaudio
26+
fi
1927
else
2028
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
21-
poetry --quiet add torch torchaudio torchvision
29+
if [[ ${TORCH_ONLY} == 'true' ]]; then
30+
poetry --quiet add torch
31+
else
32+
poetry --quiet add torch torchaudio torchvision
33+
fi
2234
fi
2335

24-
python ../test/smoke_test/smoke_test.py
36+
python ../test/smoke_test/smoke_test.py ${TEST_SUFFIX} --runtime-error-check disabled
2537
conda deactivate
2638
conda env remove -p ${ENV_NAME}_poetry
2739
cd ..

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ jobs:
7171
if [[ ${MATRIX_PACKAGE_TYPE} == "manywheel" ]] && \
7272
([[ ${MATRIX_GPU_ARCH_VERSION} == "12.1" && ${MATRIX_CHANNEL} != "release" ]] || \
7373
[[ ${MATRIX_GPU_ARCH_VERSION} == "11.7" && ${MATRIX_CHANNEL} == "release" ]]); then
74-
source ./.github/scripts/validate_pipy.sh --runtime-error-check disabled
74+
source ./.github/scripts/validate_pipy.sh
7575
# temporary disable poetry check
76-
# source ./.github/scripts/validate_poetry.sh --runtime-error-check disabled
76+
source ./.github/scripts/validate_poetry.sh
7777
fi
7878
7979
# Standart case: Validate binaries

0 commit comments

Comments
 (0)