TheNeuralBit commented on code in PR #17494:
URL: https://github.com/apache/beam/pull/17494#discussion_r861259460


##########
sdks/python/apache_beam/ml/inference/pytorch.py:
##########
@@ -68,13 +71,14 @@ class PytorchModelLoader(ModelLoader):
   def __init__(
       self,
       state_dict_path: str,
-      model_class: torch.nn.Module,
+      model_class: Callable,

Review Comment:
   nit: you might document that this is expected to return a `torch.nn.Module` 
by changing this typehint:
   ```suggestion
         model_class: Callable[[...],torch.nn.Module],
   ```



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