Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deploy ensemble models of different versions more elegantly? #7761

Open
lzcchl opened this issue Nov 4, 2024 · 1 comment
Open

How to deploy ensemble models of different versions more elegantly? #7761

lzcchl opened this issue Nov 4, 2024 · 1 comment

Comments

@lzcchl
Copy link

lzcchl commented Nov 4, 2024

Currently, I already know how to deploy different versions of an ordinary model. Suppose we now have two models, namely resnet_v1.pth and resnet_v2.pth. Then, in my model_repo/resnet_pytorch directory, there will be folders "1" and "2", where these two model files are placed respectively. Then, in config.pbtxt, only by setting the parameter "version_policy" to "{ all{} }", these two models can be deployed simultaneously. The deployment log is as follows (Now, there is only one folder in model_repo, named "resnet_pytorch"):
+------------------------------------------------------+---------+--------+
| Model | Version | Status |
+------------------------------------------------------+---------+--------+
| resnet_pytorch | 1 | READY |
| resnet_pytorch | 2 | READY |
+------------------------------------------------------+---------+--------+

However, in actual use, we often use ensemble models, such as preprocess+resnet_v1.pth and preprocess+resnet_v2.pth. Currently, my approach is to create two folders under model_repo, called ensemble_resnet_pytorch_v1 and ensemble_resnet_pytorch_v2 respectively. In the two config.pbtxt files, I will set the model_version under ensemble_scheduling to 1 and 2 respectively. The deployment log is as follows (Now, there are four folder in model_repo, named "resnet_pytorch", "resnet_preprocess", "ensemble_resnet_pytorch_v1", "ensemble_resnet_pytorch_v2"):
+------------------------------------------------------+---------+--------+
| Model | Version | Status |
+------------------------------------------------------+---------+--------+
| ensemble_resnet_pytorch_v1 | 1 | READY |
| ensemble_resnet_pytorch_v2 | 1 | READY |
| resnet_preprocess | 1 | READY |
| resnet_pytorch | 1 | READY |
| resnet_pytorch | 2 | READY |
+------------------------------------------------------+---------+--------+

But, I think creating two folders("ensemble_resnet_pytorch_v1", "ensemble_resnet_pytorch_v2") for different ensemble models respectively is not elegant enough. Is there a more appropriate way to deploy ensemble models of different versions (only one folder "ensemble_resnet_pytorch" with two version)?

@dong-toggle-ai
Copy link

same here, would be good to know the best way to use multiple versions for ensemble models. have you got any idea yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants