Skip to content

Conversation

@ymao1
Copy link
Contributor

@ymao1 ymao1 commented Nov 1, 2024

Resolves https://github.com/elastic/ml-team/issues/1377

Summary

When creating an inference endpoint for a built in model, the endpoint is created first and then the model is started. Because the license is not checked until the model is started, we are left with orphan inference endpoints. This updates the logic to catch license errors returned by the PutTrainedModelAction and delete the inference endpoint that was created.

To Verify

Create an inference endpoint using

PUT _inference/sparse_embedding/my-inference-endpoint
{
  "service": "elser",
  "service_settings": {
    "num_allocations": 1,
    "num_threads": 1
  }
}

You should see a 403 license error response. Verify that the inference endpoint does not exist with

GET _inference/sparse_embedding/my-inference-endpoint

which should now return a 404

@ymao1 ymao1 changed the title Deleting inference endpoint if start model action returns license error [Inference API] Deleting inference endpoint if start model action returns license error Nov 1, 2024
@ymao1 ymao1 self-assigned this Nov 1, 2024
@ymao1 ymao1 force-pushed the inference-api-insufficient-license branch from b46b990 to b66dfc1 Compare November 4, 2024 18:04
@ymao1 ymao1 closed this May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants