damccorm commented on code in PR #23266:
URL: https://github.com/apache/beam/pull/23266#discussion_r973275891
##########
sdks/python/apache_beam/ml/inference/tensorrt_inference.py:
##########
@@ -272,7 +273,8 @@ def run_inference(
return [
PredictionResult(
- x, [prediction[idx] for prediction in cpu_allocations]) for idx,
+ x if not drop_example else None,
+ [prediction[idx] for prediction in cpu_allocations]) for idx,
Review Comment:
Can we use `_convert_to_result` here too? I don't think there's a reason
these predictions can't be dictionaries, so this will handle that case
automatically
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]