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


##########
sdks/python/apache_beam/ml/inference/pytorch_inference.py:
##########
@@ -71,18 +73,26 @@ def _load_model(
   try:
     logging.info(
         "Loading state_dict_path %s onto a %s device", state_dict_path, device)
-    state_dict = torch.load(file, map_location=device)
+    if not use_torch_script_format:

Review Comment:
   This comment is a no-op. I was considering the idea of not having a 
`use_torch_script_format` parameter and just inferring whether we should do 
that based on if `model_class` was set. My second comment here was saying that 
I don't actually think its a good idea.
   
   Mostly just wanted to call it out since it was a sticking point on my first 
review pass.



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