Skip to content

Commit 8c01462

Browse files
authored
Migrate Validation Workflows to test-infra. Simplify setup logic (#2022)
1 parent 2e50bf9 commit 8c01462

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

.github/scripts/validate_binaries.sh

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
1-
conda create -y -n ${ENV_NAME} python=${MATRIX_PYTHON_VERSION} numpy
2-
conda activate ${ENV_NAME}
3-
export CONDA_CHANNEL="pytorch"
4-
export PIP_DOWNLOAD_URL="https://download.pytorch.org/whl/cpu"
5-
export TEXT_PIP_PREFIX=""
6-
7-
if [[ ${MATRIX_CHANNEL} = "nightly" ]]; then
8-
export TEXT_PIP_PREFIX="--pre"
9-
export PIP_DOWNLOAD_URL="https://download.pytorch.org/whl/nightly/cpu"
10-
export CONDA_CHANNEL="pytorch-nightly"
11-
elif [[ ${MATRIX_CHANNEL} = "test" ]]; then
12-
export PIP_DOWNLOAD_URL="https://download.pytorch.org/whl/test/cpu"
13-
export CONDA_CHANNEL="pytorch-test"
14-
fi
151

162
if [[ ${MATRIX_PACKAGE_TYPE} = "conda" ]]; then
17-
conda install -y torchtext pytorch -c ${CONDA_CHANNEL}
3+
conda install -y torchtext -c ${PYTORCH_CONDA_CHANNEL}
184
else
19-
pip install ${TEXT_PIP_PREFIX} torchtext torch --extra-index-url ${PIP_DOWNLOAD_URL}
5+
pip install ${PYTORCH_PIP_PREFIX} torchtext --extra-index-url ${PYTORCH_PIP_DOWNLOAD_URL}
206
fi
217

228
python ./test/smoke_tests/smoke_tests.py

.github/workflows/validate-binaries.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ on:
4545
type: string
4646
jobs:
4747
validate-binaries:
48-
uses: pytorch/builder/.github/workflows/validate-domain-library.yml@main
48+
uses: pytorch/test-infra/.github/workflows/validate-domain-library.yml@main
4949
with:
5050
package_type: "conda,wheel"
5151
os: ${{ inputs.os }}
5252
channel: ${{ inputs.channel }}
5353
repository: "pytorch/text"
5454
smoke_test: "source ./.github/scripts/validate_binaries.sh"
55+
install_torch: true

0 commit comments

Comments
 (0)