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
fc71e815
Unverified
Commit
fc71e815
authored
Dec 07, 2023
by
Hz, Ji
Committed by
GitHub
Dec 07, 2023
Browse files
update version of warning notification for `get_default_device` to v4.38 (#27848)
parent
5324bf9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/tools/base.py
src/transformers/tools/base.py
+1
-1
No files found.
src/transformers/tools/base.py
View file @
fc71e815
...
@@ -601,7 +601,7 @@ def launch_gradio_demo(tool_class: Tool):
...
@@ -601,7 +601,7 @@ def launch_gradio_demo(tool_class: Tool):
def
get_default_device
():
def
get_default_device
():
logger
.
warning
(
logger
.
warning
(
"`get_default_device` is deprecated and will be replaced with `accelerate`'s `PartialState().default_device` "
"`get_default_device` is deprecated and will be replaced with `accelerate`'s `PartialState().default_device` "
"in version 4.3
6
of 🤗 Transformers. "
"in version 4.3
8
of 🤗 Transformers. "
)
)
if
not
is_torch_available
():
if
not
is_torch_available
():
raise
ImportError
(
"Please install torch in order to use this tool."
)
raise
ImportError
(
"Please install torch in order to use this tool."
)
...
...
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