image-classification-api icon indicating copy to clipboard operation
image-classification-api copied to clipboard

Is it safe to push trained model weight to GitHub?

Open XuanVuNguyen opened this issue 3 years ago • 2 comments

Hi @jabertuhin, this repo of yours is really useful for me to learn to deploy a deep learning project using Docker and FastAPI. I just want to know if it is a good practice to push the .pth file containing the model weight onto GitHub? Thank you in advance!

XuanVuNguyen avatar Apr 25 '22 14:04 XuanVuNguyen

Hello @XuanVuNguyen, it's great to hear that this repository helped you to learn. And about the question - it's one of the way to serve ml model. For small projects or MVP projects, I think it's sufficient to meet the goal, hence the simple approach. Though it comes with some pros and cons.

Obviously it will be good to save the model weights in a different storage(ex: aws S3 bucket) and download it while running the application.

But at the end end it depends on the use case. Sharing a blog post which might help you to understand different approaches of serving models in production - How to Serve Models

jabertuhin avatar Apr 25 '22 18:04 jabertuhin

Thank you @jabertuhin for the materials. Much appreciate!

XuanVuNguyen avatar Apr 27 '22 08:04 XuanVuNguyen