Unverified Commit 484e10f7 authored by Motoki Wu's avatar Motoki Wu Committed by GitHub
Browse files

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
parent 838b87ab
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment