Skip to content

Commit d8eafaf

Browse files
mgoinbfineran
authored andcommitted
Allow check_transformers_install to warn and pass if NM fork isn't used (#1101)
* Allow check_transformers_install to warn and pass if NM fork isn't used * . * Update src/deepsparse/transformers/__init__.py Co-authored-by: Benjamin Fineran <[email protected]> --------- Co-authored-by: Benjamin Fineran <[email protected]>
1 parent c6b17f9 commit d8eafaf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/deepsparse/transformers/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
def _check_transformers_install():
4242
import transformers as _transformers
4343

44-
if not _transformers.NM_INTEGRATED:
44+
if not getattr(_transformers, "NM_INTEGRATED", False):
4545
_LOGGER.warning(
46-
"the neuralmagic fork of transformers may not be installed. it can be "
46+
"The neuralmagic fork of transformers may not be installed. It can be "
4747
f"installed via `pip install {nm_transformers}`"
4848
)
4949

0 commit comments

Comments
 (0)