From 801ddf48a6efd9cb2d0368796c734d8138f7e262 Mon Sep 17 00:00:00 2001 From: Rajakavitha Kodhandapani Date: Fri, 17 Jan 2025 16:29:29 +0530 Subject: [PATCH] [Update] added a note about deprecation of seldon and tensorflow protocol (#6182) * added a note about deprecation of seldon and tensorflow protocol * updated the note. * Update the note * Update optimization.md * Update upgrading.md * Update iris.ipynb * Update backwards_compatability.ipynb * Update protocol_examples.ipynb * Update server_examples.ipynb * rephrased the wordings and made the OIP the default tab * removed the tabs * added to include mlserver * updated the link to mlserver docs * incorporate Mathew's suggestion * OIP first and then V2 --------- Co-authored-by: Rakavitha Kodhandapani --- doc/source/analytics/explainers.md | 7 +- doc/source/graph/protocols.md | 77 ++++++++++--------- doc/source/production/optimization.md | 5 ++ doc/source/reference/upgrading.md | 5 +- .../models/lightgbm_custom_server/iris.ipynb | 6 +- notebooks/backwards_compatability.ipynb | 5 +- notebooks/protocol_examples.ipynb | 7 +- notebooks/server_examples.ipynb | 10 ++- 8 files changed, 78 insertions(+), 44 deletions(-) diff --git a/doc/source/analytics/explainers.md b/doc/source/analytics/explainers.md index 304828715c..2fb6704b17 100644 --- a/doc/source/analytics/explainers.md +++ b/doc/source/analytics/explainers.md @@ -45,6 +45,11 @@ For an e2e example, please check AnchorTabular notebook [here](../examples/iris_ ## Explain API +**Note**: Seldon has adopted the industry-standard Open Inference Protocol (OIP) and is no longer maintaining the Seldon and TensorFlow protocols. This transition allows for greater interoperability among various model serving runtimes, such as MLServer. To learn more about implementing OIP for model serving in Seldon Core 1, see [MLServer](https://docs.seldon.ai/mlserver). + +We strongly encourage you to adopt the OIP, which provides seamless integration across diverse model serving runtimes, supports the development of versatile client and benchmarking tools, and ensures a high-performance, consistent, and unified inference experience. + + For the Seldon Protocol an endpoint path will be exposed for: ``` @@ -86,9 +91,9 @@ The explain method is also supported for tensorflow and Open Inference protocols | Protocol | URI | | ------ | ----- | +| v2 | `http:////v2/models//infer` | | seldon | `http:////api/v1.0/explain` | | tensorflow | `http:////v1/models/:explain` | -| v2 | `http:////v2/models//infer` | Note: for `tensorflow` protocol we support similar non-standard extension as for the [prediction API](../graph/protocols.md#rest-and-grpc-tensorflow-protocol), `http:////v1/models/:explain`. diff --git a/doc/source/graph/protocols.md b/doc/source/graph/protocols.md index 0ab9887fd4..53ca4d68ef 100644 --- a/doc/source/graph/protocols.md +++ b/doc/source/graph/protocols.md @@ -1,46 +1,20 @@ # Protocols -Tensorflow protocol is only available in version >=1.1. - -Seldon Core supports the following data planes: - - * [REST and gRPC Seldon protocol](#rest-and-grpc-seldon-protocol) - * [REST and gRPC Tensorflow Serving Protocol](#rest-and-grpc-tensorflow-protocol) - * [REST and gRPC Open Inference Protocol](#v2-protocol) - -## REST and gRPC Seldon Protocol - - * [REST Seldon Protocol](../reference/apis/index.html) - -Seldon is the default protocol for SeldonDeployment resources. You can specify the gRPC protocol by setting `transport: grpc` in your SeldonDeployment resource or ensuring all components in the graph have endpoint.tranport set ot grpc. - -See [example notebook](../examples/protocol_examples.html). - -## REST and gRPC Tensorflow Protocol - - * [REST Tensorflow Protocol definition](https://github.com/tensorflow/serving/blob/master/tensorflow_serving/g3doc/api_rest.md). - * [gRPC Tensorflow Protocol definition](https://github.com/tensorflow/serving/blob/master/tensorflow_serving/apis/prediction_service.proto). - -Activate this protocol by speicfying `protocol: tensorflow` and `transport: rest` or `transport: grpc` in your Seldon Deployment. See [example notebook](../examples/protocol_examples.html). +**Note**: Seldon has adopted the industry-standard Open Inference Protocol (OIP) and is no longer maintaining the Seldon and TensorFlow protocols. This transition allows for greater interoperability among various model serving runtimes, such as MLServer. To learn more about implementing OIP for model serving in Seldon Core 1, see [MLServer](https://docs.seldon.ai/mlserver). -For Seldon graphs the protocol will work as expected for single model graphs for Tensorflow Serving servers running as the single model in the graph. For more complex graphs you can chain models: +We strongly encourage you to adopt the OIP, which provides seamless integration across diverse model serving runtimes, supports the development of versatile client and benchmarking tools, and ensures a high-performance, consistent, and unified inference experience. - * Sending the response from the first as a request to the second. This will be done automatically when you defined a chain of models as a Seldon graph. It is up to the user to ensure the response of each changed model can be fed a request to the next in the chain. - * Only Predict calls can be handled in multiple model chaining. +Tensorflow protocol is only available in version >=1.1. +Seldon Core supports the following data planes: -General considerations: + * REST and gRPC Open Inference Protocol + * REST and gRPC Seldon protocol + * REST and gRPC Tensorflow Serving Protocol - * Seldon components marked as MODELS, INPUT_TRANSFORMER and OUTPUT_TRANSFORMERS will allow a PredictionService Predict method to be called. - * GetModelStatus for any model in the graph is available. - * GetModelMetadata for any model in the graph is available. - * Combining and Routing with the Tensorflow protocol is not presently supported. - * `status` and `metadata` calls can be asked for any model in the graph - * a non-standard Seldon extension is available to call predict on the graph as a whole: `/v1/models/:predict`. - * The name of the model in the `graph` section of the SeldonDeployment spec must match the name of the model loaded onto the Tensorflow Server. -## Open Inference Protocol (or V2 protocol) +### REST and gRPC Open Inference Protocol Seldon has collaborated with the [NVIDIA Triton Server Project](https://github.com/triton-inference-server/server) and the [KServe @@ -75,7 +49,7 @@ spec: name: default ``` -At present, the `v2` protocol is only supported in a subset of +At present, the `OIP` or `v2` protocol is only supported in a subset of pre-packaged inference servers. In particular, @@ -87,3 +61,36 @@ In particular, | [MLFLOW_SERVER](../servers/mlflow.md) | ✅ | [Seldon MLServer](https://github.com/seldonio/mlserver) | You can try out the `v2` in [this example notebook](../examples/protocol_examples.html). + + +### REST and gRPC Seldon Protocol +* [REST Seldon Protocol](../reference/apis/index.html) + +Seldon is the default protocol for SeldonDeployment resources. You can specify the gRPC protocol by setting `transport: grpc` in your SeldonDeployment resource or ensuring all components in the graph have endpoint.tranport set ot grpc. + +See [example notebook](../examples/protocol_examples.html). + +### REST and gRPC Tensorflow Protocol + * [REST Tensorflow Protocol definition](https://github.com/tensorflow/serving/blob/master/tensorflow_serving/g3doc/api_rest.md). + * [gRPC Tensorflow Protocol definition](https://github.com/tensorflow/serving/blob/master/tensorflow_serving/apis/prediction_service.proto). + +Activate this protocol by specifying `protocol: tensorflow` and `transport: rest` or `transport: grpc` in your Seldon Deployment. See [example notebook](../examples/protocol_examples.html). + +For Seldon graphs the protocol will work as expected for single model graphs for Tensorflow Serving servers running as the single model in the graph. For more complex graphs you can chain models: + + * Sending the response from the first as a request to the second. This will be done automatically when you defined a chain of models as a Seldon graph. It is up to the user to ensure the response of each changed model can be fed a request to the next in the chain. + * Only Predict calls can be handled in multiple model chaining. + + +General considerations: + + * Seldon components marked as MODELS, INPUT_TRANSFORMER and OUTPUT_TRANSFORMERS will allow a PredictionService Predict method to be called. + * GetModelStatus for any model in the graph is available. + * GetModelMetadata for any model in the graph is available. + * Combining and Routing with the Tensorflow protocol is not presently supported. + * `status` and `metadata` calls can be asked for any model in the graph + * a non-standard Seldon extension is available to call predict on the graph as a whole: `/v1/models/:predict`. + * The name of the model in the `graph` section of the SeldonDeployment spec must match the name of the model loaded onto the Tensorflow Server. {% endtab %} + + + diff --git a/doc/source/production/optimization.md b/doc/source/production/optimization.md index 92c12dbe8d..87701452d2 100644 --- a/doc/source/production/optimization.md +++ b/doc/source/production/optimization.md @@ -9,6 +9,11 @@ Using the Seldon python wrapper there are various optimization areas one needs t ### Seldon Protocol Payload Types with REST and gRPC +**Note**: Seldon has adopted the industry-standard Open Inference Protocol (OIP) and is no longer maintaining the Seldon and TensorFlow protocols. This transition allows for greater interoperability among various model serving runtimes, such as MLServer. To learn more about implementing OIP for model serving in Seldon Core 1, see [MLServer](https://docs.seldon.ai/mlserver). + +We strongly encourage you to adopt the OIP, which provides seamless integration across diverse model serving runtimes, supports the development of versatile client and benchmarking tools, and ensures a high-performance, consistent, and unified inference experience. + + Depending on whether you want to use REST or gRPC and want to send tensor data the format of the request will have a deserialization/serialization cost in the python wrapper. This is investigated in a [python serialization notebook](../examples/python_serialization.html). The conclusions are: diff --git a/doc/source/reference/upgrading.md b/doc/source/reference/upgrading.md index bfc005c9c9..07ac32141c 100644 --- a/doc/source/reference/upgrading.md +++ b/doc/source/reference/upgrading.md @@ -93,10 +93,13 @@ Only the v1 versions of the CRD will be supported moving forward. The v1beta1 ve ### Model Health Checks +**Note**: Seldon has adopted the industry-standard Open Inference Protocol (OIP) and is no longer maintaining the Seldon and TensorFlow protocols. This transition allows for greater interoperability among various model serving runtimes, such as MLServer. To learn more about implementing OIP for model serving in Seldon Core 1, see [MLServer](https://docs.seldon.ai/mlserver). + +We strongly encourage you to adopt the OIP, which provides seamless integration across diverse model serving runtimes, supports the development of versatile client and benchmarking tools, and ensures a high-performance, consistent, and unified inference experience. We have updated the health checks done by Seldon for the model nodes in your inference graph. If `executor.fullHealthChecks` is set to true then: * For Seldon protocol each node will be probed with `/api/v1.0/health/status`. - * For the Open Inference Protocol (or V2 protocol) each node will be probed with `/v2/health/ready`. * For tensorflow just TCP checks will be run on the http endpoint. + * For the Open Inference Protocol (or V2 protocol) each node will be probed with `/v2/health/ready`. By default we have set `executor.fullHealthChecks` to false for 1.14 release as users would need to rebuild their custom python models if they have not implemented the `health_status` method. In future we will default to `true`. diff --git a/examples/models/lightgbm_custom_server/iris.ipynb b/examples/models/lightgbm_custom_server/iris.ipynb index 6fec14f0b3..2900736c55 100644 --- a/examples/models/lightgbm_custom_server/iris.ipynb +++ b/examples/models/lightgbm_custom_server/iris.ipynb @@ -7,9 +7,13 @@ "source": [ "# Custom LightGBM Prepackaged Model Server\n", "\n", + "**Note**: Seldon has adopted the industry-standard Open Inference Protocol (OIP) and is no longer maintaining the Seldon and TensorFlow protocols. This transition allows for greater interoperability among various model serving runtimes, such as MLServer. To learn more about implementing OIP for model serving in Seldon Core 1, see [MLServer](https://docs.seldon.ai/mlserver).\n", + "\n", + "We strongly encourage you to adopt the OIP, which provides seamless integration across diverse model serving runtimes, supports the development of versatile client and benchmarking tools, and ensures a high-performance, consistent, and unified inference experience.\n", + "\n", "In this notebook we create a new custom LIGHTGBM_SERVER prepackaged server with two versions:\n", " * A Seldon protocol LightGBM model server\n", - " * A KfServing V2 protocol version using MLServer for running lightgbm models\n", + " * A KfServing Open Inference protocol or V2 protocol version using MLServer for running lightgbm models\n", "\n", "The Seldon model server is in defined in `lightgbmserver` folder.\n", "\n", diff --git a/notebooks/backwards_compatability.ipynb b/notebooks/backwards_compatability.ipynb index 3f4b3fcc61..72a7821c75 100644 --- a/notebooks/backwards_compatability.ipynb +++ b/notebooks/backwards_compatability.ipynb @@ -12,7 +12,10 @@ " * curl\n", " * grpcurl\n", " * pygmentize\n", - " \n", + "\n", + "**Note**: Seldon has adopted the industry-standard Open Inference Protocol (OIP) and is no longer maintaining the Seldon and TensorFlow protocols. This transition allows for greater interoperability among various model serving runtimes, such as MLServer. To learn more about implementing OIP for model serving in Seldon Core 1, see [MLServer](https://docs.seldon.ai/mlserver).\n", + "\n", + "We strongly encourage you to adopt the OIP, which provides seamless integration across diverse model serving runtimes, supports the development of versatile client and benchmarking tools, and ensures a high-performance, consistent, and unified inference experience.\n", "\n", "## Setup Seldon Core\n", "\n", diff --git a/notebooks/protocol_examples.ipynb b/notebooks/protocol_examples.ipynb index 289093555b..8ceb4b99f9 100644 --- a/notebooks/protocol_examples.ipynb +++ b/notebooks/protocol_examples.ipynb @@ -15,10 +15,13 @@ " \n", "## Examples\n", "\n", + " * [Open Inference Protocol or V2 Protocol](#V2-Protocol-Model)\n", " * [Seldon Protocol](#Seldon-Protocol-Model)\n", " * [Tensorflow Protocol](#Tensorflow-Protocol-Model)\n", - " * [V2 Protocol](#V2-Protocol-Model)\n", - " \n", + "\n", + "**Note**:Seldon has adopted the industry-standard Open Inference Protocol (OIP) and is no longer maintaining the Seldon and TensorFlow protocols. This transition allows for greater interoperability among various model serving runtimes, such as MLServer. To learn more about implementing OIP for model serving in Seldon Core 1, see [MLServer](https://docs.seldon.ai/mlserver).\n", + "\n", + "We strongly encourage you to adopt the OIP, which provides seamless integration across diverse model serving runtimes, supports the development of versatile client and benchmarking tools, and ensures a high-performance, consistent, and unified inference experience.\n", "\n", "## Setup Seldon Core\n", "\n", diff --git a/notebooks/server_examples.ipynb b/notebooks/server_examples.ipynb index cd0525789d..4521b848ac 100644 --- a/notebooks/server_examples.ipynb +++ b/notebooks/server_examples.ipynb @@ -65,11 +65,15 @@ "source": [ "## Serve SKLearn Iris Model\n", "\n", + "**Note**: Seldon has adopted the industry-standard Open Inference Protocol (OIP) and is no longer maintaining the Seldon and TensorFlow protocols. This transition allows for greater interoperability among various model serving runtimes, such as MLServer. To learn more about implementing OIP for model serving in Seldon Core 1, see [MLServer](https://docs.seldon.ai/mlserver).\n", + "\n", + "We strongly encourage you to adopt the OIP, which provides seamless integration across diverse model serving runtimes, supports the development of versatile client and benchmarking tools, and ensures a high-performance, consistent, and unified inference experience.\n", + "\n", "In order to deploy SKLearn artifacts, we can leverage the [pre-packaged SKLearn inference server](https://docs.seldon.io/projects/seldon-core/en/latest/servers/sklearn.html).\n", "The exposed API can follow either:\n", + "- Open Inference Protocol or V2 Protocol.\n", + "- Seldon protocol. \n", "\n", - "- The default Seldon protocol. \n", - "- The V2 protocol.\n", "\n" ] }, @@ -350,7 +354,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### V2 protocol\n", + "### Open Inference Protocol or V2 Protocol\n", "\n", "For example, we can consider the config below:" ]