tvalentyn commented on issue #22402:
URL: https://github.com/apache/beam/issues/22402#issuecomment-1201791011

   As far as RunInference is concerned, we call 
`OpenClipTorchModelHandlerTensor.load_model()` each time upon retry. Looking at 
the stacktrace, that's where the error is coming from. 
   
   ```
   2022-07-21 18:46:51.096 PDT
    model = open_clip.create_model(self.model_name, pretrained=self.pretrained, 
device=self._device)
   2022-07-21 18:46:51.096 PDT
    File "/venv/lib/python3.8/site-packages/open_clip/factory.py", line 108, in 
create_model
   2022-07-21 18:46:51.096 PDT
    model.load_state_dict(load_state_dict(checkpoint_path))
   2022-07-21 18:46:51.096 PDT
    File "/venv/lib/python3.8/site-packages/open_clip/factory.py", line 50, in 
load_state_dict
   2022-07-21 18:46:51.096 PDT
    checkpoint = torch.load(checkpoint_path, map_location=map_location)
   2022-07-21 18:46:51.096 PDT
    File "/venv/lib/python3.8/site-packages/torch/serialization.py", line 713, 
in load
   2022-07-21 18:46:51.096 PDT
    return _legacy_load(opened_file, map_location, pickle_module, 
**pickle_load_args)
   2022-07-21 18:46:51.096 PDT
    File "/venv/lib/python3.8/site-packages/torch/serialization.py", line 938, 
in _legacy_load
   ```


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