Open wnagchenghku opened 6 years ago
@simon-mo @withsmilo Any thought?
We should. Can you submit a PR?
@simon-mo Yep sounds good. I will wait for the author for a couple days and start if he doesn't respond.
@wnagchenghku Would you want to create a PR for this?
Hi, in https://github.com/ucbrise/clipper/blob/develop/clipper_admin/clipper_admin/deployers/pytorch.py#L201, I found clipper serializes the model and weight separately using
cloudpickle
andtorch.save(the_model.state_dict(), PATH)
. I'm curious why does clipper do this serialization separately? From https://pytorch.org/docs/stable/notes/serialization.html, pytorch can actually serialize the entire model in one step. I tested that loading the entire model using torch.load is much much much faster than cloudpickle.