Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cherry-pick] [0.15] Fix validation workflow for test channel (#2071) #2087

Merged
merged 1 commit into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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__)