yeandy commented on code in PR #22795:
URL: https://github.com/apache/beam/pull/22795#discussion_r950478717


##########
sdks/python/apache_beam/ml/inference/pytorch_inference_test.py:
##########
@@ -373,6 +373,40 @@ def test_invalid_input_type(self):
         # pylint: disable=expression-not-assigned
         pcoll | RunInference(model_handler)
 
+  def test_gpu_convert_to_cpu(self):

Review Comment:
   The user specifies GPU using the `device='GPU'` arg. However, it detects 
that we're running the test on a machine without GPU, so it does automatic 
conversion to CPU.
   ```
           model_handler = PytorchModelHandlerTensor(
               state_dict_path=path,
               model_class=PytorchLinearRegression,
               model_params={
                   'input_dim': 1, 'output_dim': 1
               },
               device='GPU')
   ``` 
   Added clarifying comments.



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