damccorm commented on code in PR #29999:
URL: https://github.com/apache/beam/pull/29999#discussion_r1467868929


##########
sdks/python/apache_beam/ml/inference/pytorch_inference.py:
##########
@@ -243,9 +250,12 @@ def __init__(
     with PyTorch 1.9 and 1.10.
     """
     self._state_dict_path = state_dict_path
-    if device == 'GPU':
+    if device in ['gpu', 'GPU', 'cuda', 'CUDA']:

Review Comment:
   Hey, sorry for the slow review - this looks mostly good. The only thing I'd 
ask is that if we go case-insensitive we do it all the way (so `device.lower() 
== 'gpu'` here, and the same type of change applied elsewhere in the PR). 
Otherwise, this looks good to me, 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