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
aac8ee42
Unverified
Commit
aac8ee42
authored
Jun 24, 2024
by
Hans Wang
Committed by
GitHub
Jun 24, 2024
Browse files
Fix the error caused by incorrect use of logger in pipeline (#31565)
parent
c54a8ca4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/pipelines/base.py
src/transformers/pipelines/base.py
+1
-1
No files found.
src/transformers/pipelines/base.py
View file @
aac8ee42
...
@@ -850,7 +850,7 @@ class Pipeline(_ScikitCompat, PushToHubMixin):
...
@@ -850,7 +850,7 @@ class Pipeline(_ScikitCompat, PushToHubMixin):
or
is_torch_xpu_available
(
check_device
=
True
)
or
is_torch_xpu_available
(
check_device
=
True
)
or
is_torch_mps_available
()
or
is_torch_mps_available
()
):
):
logg
ing
.
warning
(
logg
er
.
warning
(
"Hardware accelerator e.g. GPU is available in the environment, but no `device` argument"
"Hardware accelerator e.g. GPU is available in the environment, but no `device` argument"
" is passed to the `Pipeline` object. Model will be on CPU."
" is passed to the `Pipeline` object. Model will be on CPU."
)
)
...
...
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