Skip to content

Commit

Permalink
add automatic deploy doc in connecting to externall hosted models
Browse files Browse the repository at this point in the history
Signed-off-by: Xun Zhang <[email protected]>
  • Loading branch information
Zhangxunmt committed Mar 21, 2024
1 parent af87060 commit 6ea97f6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions _ml-commons-plugin/api/model-apis/deploy-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ 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, this API can be bypassed and the model can be deployed automatically when it's predicted the first time through the Predict API. To enable the automatic remote model deployment, please enable the following cluster setting:
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, by default the model is deployed automatically 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).

Check failure on line 11 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": 11, "column": 497}}}, "severity": "ERROR"}

```json
PUT _cluster/settings
{
"persistent": {
"plugins.ml_commons.model_auto_deploy.enable": "true"
"plugins.ml_commons.model_auto_deploy.enable": "false"
}
}
```
Expand Down
13 changes: 12 additions & 1 deletion _ml-commons-plugin/remote-models/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,18 @@ Take note of the returned `model_id` because you’ll need it to deploy the mode

## Step 4: Deploy the model

To deploy the registered model, provide its model ID from step 3 in the following request:
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
```json
PUT _cluster/settings
{
"persistent": {
"plugins.ml_commons.model_auto_deploy.enable" : "false"
}
}
```
{% include copy-curl.html %}

To deploy the registered model manually, provide its model ID from step 3 in the following request:

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

0 comments on commit 6ea97f6

Please sign in to comment.