Skip to content

Commit

Permalink
Fix validation workflow for test channel (#2071) (#2087)
Browse files Browse the repository at this point in the history
* Validate test binaries test

* Fix validate binaries for py3.11

* fix lint

* remove temp change

Co-authored-by: Andrey Talman <atalman@fb.com>
  • Loading branch information
joecummings and atalman committed Feb 28, 2023
1 parent 97a78a0 commit 420eb65
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/scripts/validate_binaries.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 6 additions & 1 deletion test/smoke_tests/smoke_tests.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
"""Run smoke tests"""

import os
import re

import torchdata
import torchtext
import torchtext.version # noqa: F401

NIGHTLY_ALLOWED_DELTA = 3
channel = os.getenv("MATRIX_CHANNEL")


def validateTorchdataVersion():
Expand All @@ -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__)

0 comments on commit 420eb65

Please sign in to comment.