Fix torch version check in Vilt (#18260)

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar 2022-07-22 16:24:49 +02:00 committed by GitHub
parent 7cb4da13fe
commit d95a32cc60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ from .configuration_vilt import ViltConfig
logger = logging.get_logger(__name__)
if torch.__version__ < (1, 10, 0):
if version.parse(torch.__version__) < version.parse("1.10.0"):
logger.warning(
f"You are using torch=={torch.__version__}, but torch>=1.10.0 is required to use "
"ViltModel. Please upgrade torch."