diff --git a/setup.py b/setup.py index 7313694c69..3ebc986e40 100644 --- a/setup.py +++ b/setup.py @@ -145,9 +145,8 @@ def _parse_requirements_file(file_path): ] _yolov8_integration_deps = _yolo_integration_deps + ["ultralytics==8.0.124"] _transformers_integration_deps = [ - f"{'nm-transformers' if is_release else 'nm-transformers-nightly'}" - f"~={version_base}", - "datasets<=2.11", + "transformers<4.35", + "datasets<2.13", "scikit-learn", "seqeval", ] @@ -166,7 +165,7 @@ def _parse_requirements_file(file_path): _clip_deps = [ "open_clip_torch==2.20.0", "scipy<1.9.2,>=1.8", - f"{'nm-transformers' if is_release else 'nm-transformers-nightly'}", + "transformers<4.35", ] _torch_deps = ["torch>=1.7.0,<=2.0"] diff --git a/src/deepsparse/transformers/__init__.py b/src/deepsparse/transformers/__init__.py index b434dd86cf..1b254a76e8 100644 --- a/src/deepsparse/transformers/__init__.py +++ b/src/deepsparse/transformers/__init__.py @@ -19,7 +19,6 @@ # flake8: noqa -import logging as _logging from deepsparse.analytics import deepsparse_analytics as _analytics @@ -35,22 +34,6 @@ raise ImportError("Please install deepsparse[transformers] to use this pathway") -_LOGGER = _logging.getLogger(__name__) - - -def _check_transformers_install(): - import transformers as _transformers - - if not getattr(_transformers, "NM_INTEGRATED", False): - _LOGGER.warning( - "The neuralmagic fork of transformers may not be installed. It can be " - "installed via `pip install nm_transformers`" - ) - - -_check_transformers_install() - - from .helpers import * from .loaders import * from .pipelines import * diff --git a/tests/examples/test_twitter_nlp.py b/tests/examples/test_twitter_nlp.py index 187e05e2ce..71a850acd7 100644 --- a/tests/examples/test_twitter_nlp.py +++ b/tests/examples/test_twitter_nlp.py @@ -26,8 +26,9 @@ def install_reqs(): "-m", "pip", "install", - "-r", - "examples/twitter-nlp/requirements.txt", + "git+https://github.com/twintproject/" + "twint@e7c8a0c764f6879188e5c21e25fb6f1f856a7221#egg=twint", + "rich>=12.2.0", ] )