Problem with plugins ml model

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Opensearch version 3.2.0/ Server from Mittwald/sending requests using Postman version: 11.64.7

Describe the issue: Hello, first off I’m not a programmer so bear with me :slight_smile: I have created a container to host Opensearch on our server from mittwald with the following variables (OpenSearch | mittwald Developer Portal):

OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m
bootstrap.memory_lock=true
cluster.name=opensearch-cluster
discovery.seed_hosts=opensearch-test
node.name=opensearch-test
plugins.security.ssl.http.enabled=false
discovery.type=single-node

OPENSEARCH_INITIAL_ADMIN_PASSWORD=XXXXX

These variables were added while trying to fix the issue:

PLUGINS_ML_COMMONS_ONLY_RUN_ON_ML_NODE=false
PLUGINS_ML_COMMONS_ALLOW_REGISTERING_MODEL_VIA_URL=true
NODE_ROLES=ml,data,ingest,knn

This variable was suggested by mittwald but it didn’t work:

plugins.ml_commons.enabled=true

After creating the container I managed to create the “test index”, set up the ingest pipeline and create the “my ai search index” but when I try to ingest data in the next step I get this error message (screenshots below–> I could only upload 1 screenshot cause I’m a new user e.e ):

{
  "error": {
    "root_cause": [
      {
        "type": "index_not_found_exception",
        "reason": "no such index [.plugins-ml-model]",
        "index": ".plugins-ml-model",
        "resource.id": ".plugins-ml-model",
        "resource.type": "index_expression",
        "index_uuid": "_na_"
      }
    ],
    "type": "status_exception",
    "reason": "Failed to get data object from index .plugins-ml-model",
    "caused_by": {
      "type": "index_not_found_exception",
      "reason": "no such index [.plugins-ml-model]",
      "index": ".plugins-ml-model",
      "resource.id": ".plugins-ml-model",
      "resource.type": "index_expression",
      "index_uuid": "_na_"
    }
  },
  "status": 500
}

We also tried registering a different ml model but it didn’t work.

Any help to solve this issue would be very much appreciated.

Thanks!

Best wishes,

Vio

Configuration:

Relevant Logs or Screenshots:

Hi @vio, according to your logs, OpenSearch can’t find .plugins-ml-model

When you register a model in OpenSearch, it will produce a task ID.
i.e.

POST /_plugins/_ml/models/_register
{
  "name": "huggingface/sentence-transformers/msmarco-distilbert-base-tas-b",
  "version": "1.0.2",
  "model_group_id": "6Vx_upkBrDLvWN0WEdnk",
  "model_format": "TORCH_SCRIPT"
}

output:

{
  "task_id": "DVyHupkBrDLvWN0WR9p0",
  "status": "CREATED"
}

By running the command below, you’ll find the status of that registration process. Ideally you should see the state COMPLETED.

GET _plugins/_ml/tasks/DVyHupkBrDLvWN0WR9p0

output:

{
  "model_id": "uYSHupkBp3CjD81DS79i",
  "task_type": "REGISTER_MODEL",
  "function_name": "TEXT_EMBEDDING",
  "state": "COMPLETED",
  "worker_node": [
    "RwngUt20TxO29iIh0bsKLQ"
  ],
  "create_time": 1759771051889,
  "last_update_time": 1759771088367,
  "is_async": true
}

Also, the model registration process will create .plugins-ml-model index. If that’s missing, then model registration didn’t happen.
Did you get a task id when registering a model, and if you did, what was the task status?

1 Like

Heya @pablo,

thank you so much for getting back to me :slight_smile: your reply send me on the right path to find a solution which is awesome :smiley:
I had to change the cluster settings
PUT-(url)/_cluster/settings
{
“persistent”: {
“plugins.ml_commons.only_run_on_ml_node”: false
}
}
And then register a ml model group before registering a ml model :slight_smile:
Now it works as intended, thanks again!

Best wishes,

Vio

2 Likes