Skip to content

Commit

Permalink
Migrate Validation Workflows to test-infra. Simplify setup logic (pyt…
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman authored Jan 13, 2023
1 parent 2e50bf9 commit 8c01462
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
18 changes: 2 additions & 16 deletions .github/scripts/validate_binaries.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
conda create -y -n ${ENV_NAME} python=${MATRIX_PYTHON_VERSION} numpy
conda activate ${ENV_NAME}
export CONDA_CHANNEL="pytorch"
export PIP_DOWNLOAD_URL="https://download.pytorch.org/whl/cpu"
export TEXT_PIP_PREFIX=""

if [[ ${MATRIX_CHANNEL} = "nightly" ]]; then
export TEXT_PIP_PREFIX="--pre"
export PIP_DOWNLOAD_URL="https://download.pytorch.org/whl/nightly/cpu"
export CONDA_CHANNEL="pytorch-nightly"
elif [[ ${MATRIX_CHANNEL} = "test" ]]; then
export PIP_DOWNLOAD_URL="https://download.pytorch.org/whl/test/cpu"
export CONDA_CHANNEL="pytorch-test"
fi

if [[ ${MATRIX_PACKAGE_TYPE} = "conda" ]]; then
conda install -y torchtext pytorch -c ${CONDA_CHANNEL}
conda install -y torchtext -c ${PYTORCH_CONDA_CHANNEL}
else
pip install ${TEXT_PIP_PREFIX} torchtext torch --extra-index-url ${PIP_DOWNLOAD_URL}
pip install ${PYTORCH_PIP_PREFIX} torchtext --extra-index-url ${PYTORCH_PIP_DOWNLOAD_URL}
fi

python ./test/smoke_tests/smoke_tests.py
3 changes: 2 additions & 1 deletion .github/workflows/validate-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ on:
type: string
jobs:
validate-binaries:
uses: pytorch/builder/.github/workflows/validate-domain-library.yml@main
uses: pytorch/test-infra/.github/workflows/validate-domain-library.yml@main
with:
package_type: "conda,wheel"
os: ${{ inputs.os }}
channel: ${{ inputs.channel }}
repository: "pytorch/text"
smoke_test: "source ./.github/scripts/validate_binaries.sh"
install_torch: true

0 comments on commit 8c01462

Please sign in to comment.