You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/04/25 22:26:34 UTC
[GitHub] [beam] AnandInguva commented on a diff in pull request #17460: Change return type for PytorchInferenceRunner
AnandInguva commented on code in PR #17460:
URL: https://github.com/apache/beam/pull/17460#discussion_r858073801
##########
sdks/python/apache_beam/ml/inference/pytorch.py:
##########
@@ -37,7 +37,7 @@ def __init__(self, device: torch.device):
self._device = device
def run_inference(self, batch: List[torch.Tensor],
- model: torch.nn.Module) -> Iterable[torch.Tensor]:
+ model: torch.nn.Module) -> Iterable[PredictionResult]:
"""
Review Comment:
I think its done in the later stage in a DoFn
https://github.com/apache/beam/blob/68b9100db4b82196eba025bd417c46d03656f7c0/sdks/python/apache_beam/ml/inference/base.py#L210
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org