diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh index 3233b6d462..cf0f966eea 100755 --- a/.github/scripts/validate_binaries.sh +++ b/.github/scripts/validate_binaries.sh @@ -1,6 +1,11 @@ if [[ ${MATRIX_PACKAGE_TYPE} = "conda" ]]; then - conda install -y torchtext -c ${PYTORCH_CONDA_CHANNEL} + #special case for Python 3.11 + if [[ ${MATRIX_PYTHON_VERSION} == '3.11' ]]; then + conda install -y torchtext -c malfet -c ${PYTORCH_CONDA_CHANNEL} + else + conda install -y torchtext -c ${PYTORCH_CONDA_CHANNEL} + fi else pip install ${PYTORCH_PIP_PREFIX} torchtext --extra-index-url ${PYTORCH_PIP_DOWNLOAD_URL} fi diff --git a/test/smoke_tests/smoke_tests.py b/test/smoke_tests/smoke_tests.py index 14c963250f..2fbaeec5ec 100644 --- a/test/smoke_tests/smoke_tests.py +++ b/test/smoke_tests/smoke_tests.py @@ -1,5 +1,6 @@ """Run smoke tests""" +import os import re import torchdata @@ -7,6 +8,7 @@ import torchtext.version # noqa: F401 NIGHTLY_ALLOWED_DELTA = 3 +channel = os.getenv("MATRIX_CHANNEL") def validateTorchdataVersion(): @@ -19,5 +21,8 @@ def validateTorchdataVersion(): raise RuntimeError(f"torchdata binary {torchdata.__version__} is more than {NIGHTLY_ALLOWED_DELTA} days old!") -validateTorchdataVersion() +if channel == "nightly": + validateTorchdataVersion() + print("torchtext version is ", torchtext.__version__) +print("torchdata version is ", torchdata.__version__)