Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Incorrect request body for create and patch version (#522)
<!-- 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! --> # Description <!-- Briefly describe the motivation for the change. Please include illustrations where appropriate. --> Previously in this #518 we introduce CRUD API for model schema, also changed the version schema that aim to update model schema during version creation. While CRUID API is working correctly, create model version with model schema info is not working properly, due to the request body type that is used for the controller is not `Version` but `VersionPost`. Hence this PR try to fix that issue # Modifications <!-- Summarize the key code changes. --> * `api/api/version_api.go` -> Update the model version creation by supplying model schema data from `VersionPost` to `Version` * `api/models/version.go` -> Including `ModelSchema` field for `VersionPost` and `VersionPatch` struct to supply model schema info during model version creation or patch * `python/sdk/merlin/model_schema.py` -> Add `output_class` field to model prediction output * `python/sdk/test/integration_test.py` -> Add new integration test for model schema # Tests <!-- Besides the existing / updated automated tests, what specific scenarios should be tested? Consider the backward compatibility of the changes, whether corner cases are covered, etc. Please describe the tests and check the ones that have been completed. Eg: - [x] Deploying new and existing standard models - [ ] Deploying PyFunc models --> # Checklist - [ ] Added PR label - [x] 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 introduces API changes # Release Notes <!-- 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 ```
- Loading branch information