From b1249869714184182dd555b4adbe8be1cd541c34 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 17 Nov 2023 11:38:47 -0800 Subject: [PATCH 1/4] test --- .github/scripts/validate_pipy.sh | 12 ++++++++--- .github/scripts/validate_poetry.sh | 28 ++++++++++--------------- .github/workflows/validate-binaries.yml | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/scripts/validate_pipy.sh b/.github/scripts/validate_pipy.sh index ed7915079..d7a930899 100644 --- a/.github/scripts/validate_pipy.sh +++ b/.github/scripts/validate_pipy.sh @@ -2,15 +2,21 @@ conda create -yn ${ENV_NAME}_pypi python=${MATRIX_PYTHON_VERSION} numpy ffmpeg conda activate ${ENV_NAME}_pypi TEST_SUFFIX="" +RELEASE_SUFFIX="" +# if RELESE version is passed as parameter - install speific version +if [[ ! -z ${RELEASE_VERSION} ]]; then + RELEASE_SUFFIX="==${RELEASE_VERSION}" +fi + if [[ ${TORCH_ONLY} == 'true' ]]; then TEST_SUFFIX=" --package torchonly" - pip3 install --pre torch --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn" + pip3 install --pre torch${RELEASE_SUFFIX} --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn" else if [[ ${MATRIX_CHANNEL} != "release" ]]; then - pip3 install --pre torch --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn" + pip3 install --pre torch${RELEASE_SUFFIX} --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn" pip3 install --pre torchvision torchaudio --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}" else - pip3 install torch torchvision torchaudio + pip3 install torch${RELEASE_SUFFIX} torchvision torchaudio fi fi diff --git a/.github/scripts/validate_poetry.sh b/.github/scripts/validate_poetry.sh index 3c41d5b45..8a2f268d2 100644 --- a/.github/scripts/validate_poetry.sh +++ b/.github/scripts/validate_poetry.sh @@ -13,25 +13,19 @@ if [[ ${TORCH_ONLY} == 'true' ]]; then TEST_SUFFIX=" --package torchonly" fi -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-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 +RELEASE_SUFFIX="" +# if RELESE version is passed as parameter - install speific version +if [[ ! -z ${RELEASE_VERSION} ]]; then + RELEASE_SUFFIX="@${RELEASE_VERSION}" +fi - if [[ ${TORCH_ONLY} != 'true' ]]; then - poetry --quiet add --source domains torchvision torchaudio - fi +# 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 pytorch "https://download.pytorch.org/whl/${MATRIX_DESIRED_CUDA}" +if [[ ${TORCH_ONLY} == 'true' ]]; then + poetry --quiet add torch${RELEASE_SUFFIX} else - export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring - poetry source add --priority=explicit pytorch "https://download.pytorch.org/whl/${MATRIX_DESIRED_CUDA}" - if [[ ${TORCH_ONLY} == 'true' ]]; then - poetry --quiet add torch - else - poetry --quiet add --source pytorch torch torchaudio torchvision - fi + poetry --quiet add --source pytorch torch${RELEASE_SUFFIX} torchaudio torchvision fi python ../test/smoke_test/smoke_test.py ${TEST_SUFFIX} --runtime-error-check disabled diff --git a/.github/workflows/validate-binaries.yml b/.github/workflows/validate-binaries.yml index f6f73b012..fee16dca9 100644 --- a/.github/workflows/validate-binaries.yml +++ b/.github/workflows/validate-binaries.yml @@ -114,7 +114,7 @@ jobs: ref: ${{ inputs.ref || github.ref }} torchonly: ${{ inputs.torchonly }} version: ${{ inputs.version }} - release-matrix: ${{ needs.generate-rlease-matrix.outputs.matrix }} + release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }} mac-arm64: if: inputs.os == 'macos' || inputs.os == 'all' From 70ae396c158458cb40cd253afd61a07c8af23f97 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 17 Nov 2023 13:23:45 -0800 Subject: [PATCH 2/4] poetry_fix --- .github/scripts/validate_poetry.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/scripts/validate_poetry.sh b/.github/scripts/validate_poetry.sh index 8a2f268d2..1096a1181 100644 --- a/.github/scripts/validate_poetry.sh +++ b/.github/scripts/validate_poetry.sh @@ -19,16 +19,14 @@ if [[ ! -z ${RELEASE_VERSION} ]]; then RELEASE_SUFFIX="@${RELEASE_VERSION}" fi -# 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 pytorch "https://download.pytorch.org/whl/${MATRIX_DESIRED_CUDA}" + if [[ ${TORCH_ONLY} == 'true' ]]; then poetry --quiet add torch${RELEASE_SUFFIX} else poetry --quiet add --source pytorch torch${RELEASE_SUFFIX} torchaudio torchvision fi -python ../test/smoke_test/smoke_test.py ${TEST_SUFFIX} --runtime-error-check disabled +python ../test/smoke_test/smoke_test.py --package torchonly --runtime-error-check disabled conda deactivate conda env remove -p ${ENV_NAME}_poetry cd .. From e1a6fe9012afe2fec4a7d117d088f0394141a547 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 17 Nov 2023 13:26:33 -0800 Subject: [PATCH 3/4] test --- .github/scripts/validate_poetry.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/validate_poetry.sh b/.github/scripts/validate_poetry.sh index 1096a1181..3d0edba03 100644 --- a/.github/scripts/validate_poetry.sh +++ b/.github/scripts/validate_poetry.sh @@ -26,7 +26,7 @@ else poetry --quiet add --source pytorch torch${RELEASE_SUFFIX} torchaudio torchvision fi -python ../test/smoke_test/smoke_test.py --package torchonly --runtime-error-check disabled +python ../test/smoke_test/smoke_test.py ${TEST_SUFFIX} --runtime-error-check disabled conda deactivate conda env remove -p ${ENV_NAME}_poetry cd .. From 4d985d7dff5e685779c790088aa5c2a912bbc1b0 Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 17 Nov 2023 13:45:33 -0800 Subject: [PATCH 4/4] test --- .github/scripts/validate_poetry.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/validate_poetry.sh b/.github/scripts/validate_poetry.sh index 3d0edba03..e147aab8f 100644 --- a/.github/scripts/validate_poetry.sh +++ b/.github/scripts/validate_poetry.sh @@ -23,7 +23,7 @@ fi if [[ ${TORCH_ONLY} == 'true' ]]; then poetry --quiet add torch${RELEASE_SUFFIX} else - poetry --quiet add --source pytorch torch${RELEASE_SUFFIX} torchaudio torchvision + poetry --quiet add torch${RELEASE_SUFFIX} torchaudio torchvision fi python ../test/smoke_test/smoke_test.py ${TEST_SUFFIX} --runtime-error-check disabled