Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing model version revision (#471)
<!-- Thanks for sending a pull request! Here are some tips for you: 1. Run unit tests and ensure that they are passing 2. If your change introduces any API changes, make sure to update the e2e tests 3. Make sure documentation is updated for your PR! --> **What this PR does / why we need it**: <!-- Explain here the context and why you're making the change. What is the problem you're trying to solve. ---> The current implementation of model version redeployment patches the existing inference service however, if the patch fails, it will delete the existing inference service ([ref](https://github.com/caraml-dev/merlin/blob/v0.33.0/api/cluster/controller.go#L243-L250)). This PR reworks how we do the redeployment by introducing model version revision which itself is a new inference service that deployed for every redeployment. Then we will have a new Istio VirtualService that routes the traffic to the latest revision (latest inference service). Note that the new VirtualService adds a `Content-Type` header to the request because we need it for graceful migration to Kserve 0.11 where it requires the `Content-Type` header to be set, but our clients might not using this header. It also changes the naming convention for the deployed inference service: From: `{model_name}-{model_version}` to `{model_name}-{model_version}-{model_version_revision}` ### Serverless Deployment Before <img width="500" alt="image" src="https://github.com/caraml-dev/merlin/assets/8122852/c95675f2-0d0b-47f6-ac80-69db63d6cf21"> ### Serverless Deployment After <img width="500" alt="image" src="https://github.com/caraml-dev/merlin/assets/8122852/3e31ca6f-e406-4497-83c5-07ada08b1da0"> ### Raw Deployment Before <img width="500" alt="image" src="https://github.com/caraml-dev/merlin/assets/8122852/a2b56e92-36c5-456b-84ec-a72f51bc158b"> ### Raw Deployment After <img width="500" alt="image" src="https://github.com/caraml-dev/merlin/assets/8122852/bfc6e92d-4d1f-449c-b61c-aa89604e584f"> ### Model Version Deployment History UI <img width="500" alt="Screen Shot 2023-10-16 at 14 56 22" src="https://github.com/caraml-dev/merlin/assets/8122852/abd933b5-344c-489a-9ab8-c2293f1f5be3"> Changes this PR introduce: 1. Add `revision_id` column to `version_endpoints` table 2. Add revision number to model service name, prefixed with `r` 3. Add model version virtual service that routes to deployed model service with revision number to maintain backward compatibility a. New model service with revision number's URL is something like: my-model-name-1-r1.domain.com b. To maintain backward compatibility, the new model version virtual service have this URL: my-model-name-1.domain.com 4. Add Deployment History tab in the UI 5. Add Deployments API 6. Add redeploy label to deploymentCounter Prometheus metrics 7. Update e2e-test to use environment's default_deployment_config; Increase github e2e-test cluster environment's default_deployment_config **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Fixes model version redeployment got deleted if the redeployment fails. **Does this PR introduce a user-facing change?**: <!-- If no, just write "NONE" in the release-note block below. If yes, a release note is required. Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". For more information about release notes, see kubernetes' guide here: http://git.k8s.io/community/contributors/guide/release-notes.md --> ```release-note Add model version deployment history UI ``` **Checklist** - [ ] Added unit test, integration, and/or e2e tests - [ ] Tested locally - [ ] Updated documentation - [ ] Update Swagger spec if the PR introduce API changes - [ ] Regenerated Golang and Python client if the PR introduce API changes
- Loading branch information