Skip to content

Commit

Permalink
Validate poetry workflow (#1511)
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman authored Aug 30, 2023
1 parent fe02df7 commit 10f5379
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
20 changes: 16 additions & 4 deletions .github/scripts/validate_poetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,32 @@ poetry --version
poetry new test_poetry
cd test_poetry

TEST_SUFFIX=""
if [[ ${TORCH_ONLY} == 'true' ]]; then
TEST_SUFFIX=" --package torchonly"
else

if [[ ${MATRIX_CHANNEL} != "release" ]]; then
# Installing poetry from our custom repo. We need to configure it before use and disable authentication
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
poetry source add --priority=explicit domains "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}"
poetry source add --priority=supplemental pytorch-nightly "https://download.pytorch.org/whl/${MATRIX_CHANNEL}"
poetry source add --priority=supplemental pytorch-channel "https://download.pytorch.org/whl/${MATRIX_CHANNEL}"
poetry source add --priority=supplemental pytorch "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
poetry --quiet add --source pytorch torch
poetry --quiet add --source domains torchvision torchaudio

if [[ ${TORCH_ONLY} != 'true' ]]; then
poetry --quiet add --source domains torchvision torchaudio
fi
else
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
poetry --quiet add torch torchaudio torchvision
if [[ ${TORCH_ONLY} == 'true' ]]; then
poetry --quiet add torch
else
poetry --quiet add torch torchaudio torchvision
fi
fi

python ../test/smoke_test/smoke_test.py
python ../test/smoke_test/smoke_test.py ${TEST_SUFFIX} --runtime-error-check disabled
conda deactivate
conda env remove -p ${ENV_NAME}_poetry
cd ..
4 changes: 2 additions & 2 deletions .github/workflows/validate-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ jobs:
if [[ ${MATRIX_PACKAGE_TYPE} == "manywheel" ]] && \
([[ ${MATRIX_GPU_ARCH_VERSION} == "12.1" && ${MATRIX_CHANNEL} != "release" ]] || \
[[ ${MATRIX_GPU_ARCH_VERSION} == "11.7" && ${MATRIX_CHANNEL} == "release" ]]); then
source ./.github/scripts/validate_pipy.sh --runtime-error-check disabled
source ./.github/scripts/validate_pipy.sh
# temporary disable poetry check
# source ./.github/scripts/validate_poetry.sh --runtime-error-check disabled
source ./.github/scripts/validate_poetry.sh
fi
# Standart case: Validate binaries
Expand Down

0 comments on commit 10f5379

Please sign in to comment.