Open IamMohitM opened 2 years ago
I have added my solution to Stack Overflow which has solved the bottleneck: https://stackoverflow.com/a/73721450/8727339
However, the solution uses TensorFlow. I'd still love to hear from the TorchServe devs if something similar that can be achieved with Torch itself.
📚 The doc issue
There is no documentation about decoding the received bytes form PredictionResponse into torch tensor efficiently. Currently, the only working solution is using
ast.literal_eval
, which is extremely slow.Using methods like numpy.fromstring, numpy.frombuffer or torch.frombuffer returns the following error:
The following returns an incorrect tensor values. The number of elements are not the same as expected number of elements.
Suggest a potential alternative/fix
No response