Skip to content

Commit

Permalink
remove warning when called multiple times on gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneBinder committed Nov 5, 2024
1 parent 0c3e5e4 commit f3cfa0e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/pytorch_ie/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,6 @@ def __call__(
forward_params = {**self._forward_params, **forward_params}
postprocess_params = {**self._postprocess_params, **postprocess_params}

self.call_count += 1
if self.call_count > 10 and self.device.type == "cuda":
warnings.warn(
"You seem to be using the pipelines sequentially on GPU. In order to maximize efficiency please use a dataset",
UserWarning,
)

single_document = False
if isinstance(documents, Document):
single_document = True
Expand Down

0 comments on commit f3cfa0e

Please sign in to comment.