damccorm commented on code in PR #29223:
URL: https://github.com/apache/beam/pull/29223#discussion_r1378998460
##########
sdks/python/apache_beam/ml/inference/huggingface_inference.py:
##########
@@ -647,8 +647,15 @@ def __init__(
_validate_constructor_args_hf_pipeline(self._task, self._model)
def _deduplicate_device_value(self, device: str):
+ current_device = device.upper() if device else None
if 'device' not in self._load_pipeline_args:
- if device == 'CPU':
+ if (not current_device and current_device != 'CPU' and
Review Comment:
That's fine if we're throwing on that branch anyways
--
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]