Skip to content

Commit 123b776

Browse files
committed
move agnostic import to when it's needed to avoid dependency blow-up
1 parent 1f4860e commit 123b776

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/transformers/utils/import_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import packaging.version
3939
from packaging import version
4040

41-
from . import agnostic, logging
41+
from . import logging
4242

4343

4444
logger = logging.get_logger(__name__) # pylint: disable=invalid-name
@@ -794,6 +794,7 @@ def is_mamba_2_ssm_available() -> bool:
794794

795795
@lru_cache
796796
def is_flash_linear_attention_available():
797+
from . import agnostic
797798
is_available, fla_version = _is_package_available("fla", return_version=True)
798799
return (
799800
agnostic.gpu.is_accelerator_available()

0 commit comments

Comments
 (0)