riteshghorse commented on code in PR #29223:
URL: https://github.com/apache/beam/pull/29223#discussion_r1378248457


##########
sdks/python/apache_beam/ml/inference/huggingface_inference.py:
##########
@@ -638,6 +647,12 @@ def __init__(
     if max_batch_size is not None:
       self._batching_kwargs['max_batch_size'] = max_batch_size
     self._large_model = large_model
+    if 'device' not in self._load_pipeline_args:
+      self._load_pipeline_args['device'] = self._device
+    else:
+      _LOGGER.warning(
+          '`device` specified in `load_pipeline_args`. `device` '
+          'parameter for HuggingFacePipelineModelHandler will be ignored.')

Review Comment:
   Done, thanks!



-- 
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]

Reply via email to