forked from kubeflow/pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FastAPI: Separate model server and data plane (kubeflow#2444)
* Update kserve python dependency Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Convert to FastAPI Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Convert to FastAPI Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add workers Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add Dataplane api and model repo extension api Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Setup up single source versioning for python sdk Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix tests Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add v2 routes with FastAPIRoute Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Extract errors and add exception handler for ModelServer Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add metrics route and handler Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add kserve version in __init__.py Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Remove tornado handlers Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Move ModelNotReady to errors.py Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Remove unused arguments - max_buffer_size - max_asyncio_workers Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Clean up validate_enable_latency_logging by using strtobool Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Remove tests for validate_enable_latency_logging Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Improve error response messages Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Update handlers - fix imports for model_repository_extension.py - raise ModelNotFound exception in model_ready handler Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add model ready and list handler - replace model_metadata with model_list_handler for /v1/models - use ModelRepositoryExtension for load and unload Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix misspelling Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Use FastAPI TestClient for testing Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add V1Endpoints and update tests - switch to use v1_endpoints in FastAPI routes - make TestModel and TestTFHttpServer pass Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix TestRayServer Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix model not ready test Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix cloud event tests Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Use pytest asyncio and lowercase header key Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Set default header to json Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Update tests - fixed TestModel - fixed load/unload tests Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add V2Endpoints and data models - in v1, rename `infer` to `predict` Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Improve Swagger UI support - disable redoc and add flag for swagger ui - add example for InferenceRequest model Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Revert "Add kserve version in __init__.py" This reverts commit a0204f8bcd7cc849ae55127355d07e9d5bd4eb92. Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix the version number in setup.py by using the pathlib to get the __file__ path instead of the cwd Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix the version file in dockerfile Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix linting issue Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix other lint issues Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix lint issue Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Use version from VERSION file Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Use `Dict` for typing Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix `Dict` typing Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix `List` typing Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Support v2 load and unload Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix test_model_repository_extension.py Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix dataplane Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add orjson in requirements.txt Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Use httpx.AsyncClient to replace tornado Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Remove tornado Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add httpx in requirements.txt Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Update doc strings for some functions Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Use orjson for decoding Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Use async for liveness handler Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Added a few comments Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Unify infer and predict in dataplane Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Get rid of json Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Use ORJSONResponse by default in FastAPI application Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix orjson exception match Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add more comments Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add handler for NotImplementedError Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Use orjson for InferenceRequest deserialization Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add schema examples Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix v2 live and ready endpoints Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Use asyncio to fix start() issue Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix missing asyncio import Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add missing asyncio to start model server Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Set default host to 0.0.0.0 to fix raw deployment readiness issue Signed-off-by: Xin Fu <xfu83@bloomberg.net> * add back nest_asyncio for explainers Signed-off-by: Dan Sun <dsun20@bloomberg.net> * Use async for load and unload for model_repository_extension.py and update some comments Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Get rid of DeprecationWarning from cloudevents Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Fix test_model_repository_extension.py with async Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Add license Signed-off-by: Xin Fu <xfu83@bloomberg.net> * Update comments and docstrings Signed-off-by: Xin Fu <xfu83@bloomberg.net> Signed-off-by: Xin Fu <xfu83@bloomberg.net> Signed-off-by: Dan Sun <dsun20@bloomberg.net> Co-authored-by: Dan Sun <dsun20@bloomberg.net> Co-authored-by: Xin Fu <xfu83@bloomberg.net>
- Loading branch information
1 parent
3ba300b
commit e126d01
Showing
72 changed files
with
1,935 additions
and
806 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.