riteshghorse commented on code in PR #29223:
URL: https://github.com/apache/beam/pull/29223#discussion_r1378994257
##########
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:
we could move that outside as well but that'll be overridden anyway if
load_pipeline_args has device which is why I kept it here initially..
--
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]