Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
721d1c8c
Unverified
Commit
721d1c8c
authored
Nov 14, 2023
by
Marc Sun
Committed by
GitHub
Nov 14, 2023
Browse files
Fix FA2 import + deprecation cycle (#27330)
* put back import * switch to logger.warnings instead
parent
2ac5b932
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
src/transformers/utils/__init__.py
src/transformers/utils/__init__.py
+1
-0
src/transformers/utils/import_utils.py
src/transformers/utils/import_utils.py
+8
-0
No files found.
src/transformers/utils/__init__.py
View file @
721d1c8c
...
...
@@ -117,6 +117,7 @@ from .import_utils import (
is_essentia_available
,
is_faiss_available
,
is_flash_attn_2_available
,
is_flash_attn_available
,
is_flax_available
,
is_fsdp_available
,
is_ftfy_available
,
...
...
src/transformers/utils/import_utils.py
View file @
721d1c8c
...
...
@@ -614,6 +614,14 @@ def is_flash_attn_2_available():
return
_flash_attn_2_available
and
torch
.
cuda
.
is_available
()
def
is_flash_attn_available
():
logger
.
warning
(
"Using `is_flash_attn_available` is deprecated and will be removed in v4.38. "
"Please use `is_flash_attn_2_available` instead."
)
return
is_flash_attn_2_available
()
def
is_torchdistx_available
():
return
_torchdistx_available
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment