StyleGAN-nada icon indicating copy to clipboard operation
StyleGAN-nada copied to clipboard

Uploading trained model to Aws Model Registry

Open muhammad-ahmed-ghani opened this issue 2 years ago • 3 comments

Hi @rinongal , I have finetuned the styleganNada model and saved it by torch.save(net, "model.pt") but it didn't save the ModelClass with it due to which it is not deploying on Model Registry as standalone .pt file to serve the users. Can you help me how I pack the entire model with Class ?

muhammad-ahmed-ghani avatar May 16 '22 10:05 muhammad-ahmed-ghani

Hi @Muhammad-Ahmad-Ghani. Unfortunately I'm not familiar with the AWS model registry, and I'm not sure what type of files it expects. Do you have some guide / official documentation for the tool you're using? I could have a quick look and see if there's any simple change that comes to mind.

rinongal avatar May 18 '22 15:05 rinongal

@rinongal Actually I wanted to convert the trained model to torchscript but the input it takes isn't static and I am facing difficulty to convert it into torchscript because otherwise I always need to import the Model Class to load the saved model. Also wanted to boost its inference speed using ONNX but failed to do because of tracing problem.

muhammad-ahmed-ghani avatar May 18 '22 17:05 muhammad-ahmed-ghani

I'm honestly not familiar with ONNX or torchscript either, and I don't currently have the time to experiment with either and try to see where your issue comes up. I'll keep this issue open in case someone else reads it and can help.

rinongal avatar May 20 '22 12:05 rinongal