Skip to content

[ML] no error when updating num_threads in inference endpoint #137129

@wwang500

Description

@wwang500

Version:
9.2.0

Step to reproduce:

Right now, it is not allowed to update num_threads in inference API. ( code reference). However, the update request still returns a successful 200 response, we should throw an error instead.

Requests:


PUT _inference/rerank/mytest
{
    "service": "elasticsearch",
      "service_settings": {
        "num_threads": 1,
        "model_id": ".rerank-v1",
        "adaptive_allocations": {
          "enabled": true,
          "min_number_of_allocations": 0,
          "max_number_of_allocations": 32
        }
      },
      "task_settings": {
        "return_documents": true
      }
}


PUT _inference/mytest/_update
{
    "task_type": "rerank",
      "service_settings": {
        "num_threads": 4,
        "model_id": ".rerank-v1",
        "adaptive_allocations": {
          "enabled": true,
          "min_number_of_allocations": 0,
          "max_number_of_allocations": 32
        }
      }
}

It returns:

{
  "inference_id": "mytesta",
  "task_type": "rerank",
  "service": "elasticsearch",
  "service_settings": {
    "num_threads": 1,
    "model_id": ".rerank-v1",
    "adaptive_allocations": {
      "enabled": true,
      "min_number_of_allocations": 0,
      "max_number_of_allocations": 32
    }
  },
  "task_settings": {
    "return_documents": true
  }
}

you can see it still has "num_threads": 1,. it should throw an error instead.

Metadata

Metadata

Assignees

Labels

:mlMachine learning>bugTeam:MLMeta label for the ML team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions