mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Use logging.warning instead of warnings.warn in pipeline.__call__ (#29717)
* Use logging.warning instead of warnings.warn in pipeline.__call__ * Update src/transformers/pipelines/base.py
This commit is contained in:
parent
838b87abe2
commit
484e10f7f2
@ -1164,7 +1164,7 @@ class Pipeline(_ScikitCompat):
|
||||
|
||||
self.call_count += 1
|
||||
if self.call_count > 10 and self.framework == "pt" and self.device.type == "cuda":
|
||||
warnings.warn(
|
||||
logger.warning_once(
|
||||
"You seem to be using the pipelines sequentially on GPU. In order to maximize efficiency please use a"
|
||||
" dataset",
|
||||
UserWarning,
|
||||
|
Loading…
Reference in New Issue
Block a user