Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Xun Zhang <[email protected]>
  • Loading branch information
Zhangxunmt committed Mar 22, 2024
1 parent 1fc0f2e commit 876f410
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion _ml-commons-plugin/api/model-apis/deploy-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ nav_order: 20

# Deploy a model

The deploy model operation reads the model's chunks from the model index and then creates an instance of the model to cache into memory. This operation requires the `model_id`. For remote models, from 2.13 the model is deployed automatically by default when it's predicted the first time through the Predict API. You can disable the remote model auto deployment by setting plugins.ml_commons.model_auto_deploy.enable to false. To learn more about remote models, see [Connecting to externally hosted models]({{site.url}}{{site.baseurl}}/ml-commons-plugin/remote-models/index).
The deploy model operation reads the model's chunks from the model index and then creates an instance of the model to cache into memory. This operation requires the `model_id`.

Starting with OpenSearch version 2.13, [externally hosted models]({{site.url}}{{site.baseurl}}/ml-commons-plugin/remote-models/index) are deployed automatically by default when you send a Predict API request for the first time. To disable automatic deployment for an externally hosted model, set `plugins.ml_commons.model_auto_deploy.enable` to `false`:

Check failure on line 13 in _ml-commons-plugin/api/model-apis/deploy-model.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/ml-commons-plugin/remote-models/index)'. Raw Output: {"message": "[OpenSearch.LinksEndSlash] Add a trailing slash to the link '({{site.url}}{{site.baseurl}}/ml-commons-plugin/remote-models/index)'.", "location": {"path": "_ml-commons-plugin/api/model-apis/deploy-model.md", "range": {"start": {"line": 13, "column": 66}}}, "severity": "ERROR"}

```json
PUT _cluster/settings
Expand Down
4 changes: 2 additions & 2 deletions _ml-commons-plugin/remote-models/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Take note of the returned `model_id` because you’ll need it to deploy the mode

## Step 4: Deploy the model

From 2.13, we support automatically deploy remote model by default so this step can be skipped. You can disable it by setting plugins.ml_commons.model_auto_deploy.enable as false. To undeploy the model, please use the undeploy API to undeploy it.
Starting with OpenSearch version 2.13, externally hosted models are deployed automatically by default when you send a Predict API request for the first time. To disable automatic deployment for an externally hosted model, set `plugins.ml_commons.model_auto_deploy.enable` to `false`:
```json
PUT _cluster/settings
{
Expand All @@ -216,7 +216,7 @@ PUT _cluster/settings
```
{% include copy-curl.html %}

To deploy the registered model manually, provide its model ID from step 3 in the following request:
To undeploy the model, use the [Undeploy API]({{site.url}}{{site.baseurl}}/ml-commons-plugin/api/model-apis/undeploy-model/).

```bash
POST /_plugins/_ml/models/cleMb4kBJ1eYAeTMFFg4/_deploy
Expand Down

0 comments on commit 876f410

Please sign in to comment.