Skip to content

Commit

Permalink
Add force-reinstall option to binary validations (#1708)
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman committed Feb 22, 2024
1 parent af4827c commit effa8b7
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/scripts/validate_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ else
conda activate ${ENV_NAME}
INSTALLATION=${MATRIX_INSTALLATION/"conda install"/"conda install -y"}
TEST_SUFFIX=""

if [[ ${USE_FORCE_REINSTALL} == 'true' ]]; then
INSTALLATION=${INSTALLATION/"pip3 install"/"pip3 install --force-reinstall"}
fi

if [[ ${TORCH_ONLY} == 'true' ]]; then
INSTALLATION=${INSTALLATION/"torchvision torchaudio"/""}
TEST_SUFFIX=" --package torchonly"
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/validate-aarch64-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ on:
default: false
required: false
type: boolean
use-force-reinstall:
description: 'Use force-reinstall for pip binaries'
default: false
required: false
type: boolean
workflow_dispatch:
inputs:
channel:
Expand Down Expand Up @@ -68,6 +73,11 @@ on:
default: false
required: false
type: boolean
use-force-reinstall:
description: 'Use force-reinstall for pip binaries'
default: false
required: false
type: boolean

jobs:
generate-aarch64-linux-matrix:
Expand Down Expand Up @@ -104,6 +114,7 @@ jobs:
export TARGET_OS="linux-aarch64"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
export USE_FORCE_REINSTALL=${{ inputs.use-force-reinstall }}
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
eval "$(conda shell.bash hook)"
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/validate-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ on:
default: false
required: false
type: boolean
use-force-reinstall:
description: 'Use force-reinstall for pip binaries'
default: false
required: false
type: boolean
workflow_dispatch:
inputs:
os:
Expand Down Expand Up @@ -85,6 +90,11 @@ on:
default: false
required: false
type: boolean
use-force-reinstall:
description: 'Use force-reinstall for pip binaries'
default: false
required: false
type: boolean


jobs:
Expand All @@ -104,6 +114,7 @@ jobs:
version: ${{ inputs.version }}
release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }}
use-only-dl-pytorch-org: ${{ inputs.use-only-dl-pytorch-org }}
use-force-reinstall: ${{ inputs.use-force-reinstall }}

linux:
if: inputs.os == 'linux' || inputs.os == 'all'
Expand All @@ -117,6 +128,7 @@ jobs:
release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }}
include-test-ops: ${{ inputs.include-test-ops }}
use-only-dl-pytorch-org: ${{ inputs.use-only-dl-pytorch-org }}
use-force-reinstall: ${{ inputs.use-force-reinstall }}

linux-aarch64:
if: inputs.os == 'linux-aarch64' || inputs.os == 'all'
Expand All @@ -129,6 +141,7 @@ jobs:
version: ${{ inputs.version }}
release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }}
use-only-dl-pytorch-org: ${{ inputs.use-only-dl-pytorch-org }}
use-force-reinstall: ${{ inputs.use-force-reinstall }}

mac:
if: inputs.os == 'macos' || inputs.os == 'all'
Expand All @@ -141,6 +154,7 @@ jobs:
version: ${{ inputs.version }}
release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }}
use-only-dl-pytorch-org: ${{ inputs.use-only-dl-pytorch-org }}
use-force-reinstall: ${{ inputs.use-force-reinstall }}

mac-arm64:
if: inputs.os == 'macos' || inputs.os == 'all'
Expand All @@ -153,3 +167,4 @@ jobs:
version: ${{ inputs.version }}
release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }}
use-only-dl-pytorch-org: ${{ inputs.use-only-dl-pytorch-org }}
use-force-reinstall: ${{ inputs.use-force-reinstall }}
11 changes: 11 additions & 0 deletions .github/workflows/validate-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ on:
default: false
required: false
type: boolean
use-force-reinstall:
description: 'Use force-reinstall for pip binaries'
default: false
required: false
type: boolean
workflow_dispatch:
inputs:
channel:
Expand Down Expand Up @@ -78,6 +83,11 @@ on:
default: false
required: false
type: boolean
use-force-reinstall:
description: 'Use force-reinstall for pip binaries'
default: false
required: false
type: boolean

jobs:
generate-linux-matrix:
Expand Down Expand Up @@ -109,6 +119,7 @@ jobs:
export INCLUDE_TEST_OPS=${{ inputs.include-test-ops }}
export USE_ONLY_DL_PYTORCH_ORG=${{ inputs.use-only-dl-pytorch-org }}
export RELEASE_VERSION=${{ inputs.version }}
export USE_FORCE_REINSTALL=${{ inputs.use-force-reinstall }}
export TARGET_OS="linux"
eval "$(conda shell.bash hook)"
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/validate-macos-arm64-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ on:
default: false
required: false
type: boolean
use-force-reinstall:
description: 'Use force-reinstall for pip binaries'
default: false
required: false
type: boolean
workflow_dispatch:
inputs:
channel:
Expand Down Expand Up @@ -68,6 +73,11 @@ on:
default: false
required: false
type: boolean
use-force-reinstall:
description: 'Use force-reinstall for pip binaries'
default: false
required: false
type: boolean

jobs:
generate-macos-arm64-matrix:
Expand Down Expand Up @@ -97,5 +107,7 @@ jobs:
export TARGET_OS="macos-arm64"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
export USE_FORCE_REINSTALL=${{ inputs.use-force-reinstall }}
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
source ./.github/scripts/validate_binaries.sh
12 changes: 12 additions & 0 deletions .github/workflows/validate-macos-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ on:
default: false
required: false
type: boolean
use-force-reinstall:
description: 'Use force-reinstall for pip binaries'
default: false
required: false
type: boolean
workflow_dispatch:
inputs:
channel:
Expand Down Expand Up @@ -68,6 +73,11 @@ on:
default: false
required: false
type: boolean
use-force-reinstall:
description: 'Use force-reinstall for pip binaries'
default: false
required: false
type: boolean

jobs:
generate-macos-matrix:
Expand Down Expand Up @@ -97,5 +107,7 @@ jobs:
export TARGET_OS="macos"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
export USE_FORCE_REINSTALL=${{ inputs.use-force-reinstall }}
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
source ./.github/scripts/validate_binaries.sh
12 changes: 12 additions & 0 deletions .github/workflows/validate-windows-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ on:
default: false
required: false
type: boolean
use-force-reinstall:
description: 'Use force-reinstall for pip binaries'
default: false
required: false
type: boolean
workflow_dispatch:
inputs:
channel:
Expand Down Expand Up @@ -68,6 +73,11 @@ on:
default: false
required: false
type: boolean
use-force-reinstall:
description: 'Use force-reinstall for pip binaries'
default: false
required: false
type: boolean

jobs:
generate-windows-matrix:
Expand Down Expand Up @@ -98,6 +108,8 @@ jobs:
export TARGET_OS="windows"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
export USE_FORCE_REINSTALL=${{ inputs.use-force-reinstall }}
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
source /c/Jenkins/Miniconda3/etc/profile.d/conda.sh
if [[ ${MATRIX_GPU_ARCH_VERSION} == "12.1" ]]; then
Expand Down

0 comments on commit effa8b7

Please sign in to comment.