-
Notifications
You must be signed in to change notification settings - Fork 25.3k
[ML] Fix issues in dynamically reading the number of allocations #115095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pinging @elastic/ml-core (Team:ML) |
davidkyle
commented
Oct 18, 2024
@@ -126,6 +126,11 @@ private void getModelsByTaskType(TaskType taskType, ActionListener<GetInferenceM | |||
} | |||
|
|||
private void parseModels(List<UnparsedModel> unparsedModels, ActionListener<GetInferenceModelAction.Response> listener) { | |||
if (unparsedModels.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this check the GroupedActionListner was called with 0 requests which throws an exception
jgowdyelastic
added a commit
to elastic/kibana
that referenced
this pull request
Oct 21, 2024
…ing inference endpoints (#196577) When listing the inference endpoints available for the semantic text field, we should only list `sparse_embedding` and `text_embedding` types. <img width="353" alt="image" src="https://github.com/user-attachments/assets/95526f2b-e293-4e01-be79-b87e1ecb9a75"> This PR adds a check to the `data_visualizer/inference_endpoints` endpoint to ensure only `sparse_embedding` and `text_embedding` types are used and they have at least one allocation. NOTE, the allocation check is currently commented out waiting on an es change. elastic/elasticsearch#115095 Also renames the endpoint from `data_visualizer/inference_services` -> `data_visualizer/inference_endpoints` And renames variables which were incorrectly named "service" rather than "endpoint"
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Oct 21, 2024
…ing inference endpoints (elastic#196577) When listing the inference endpoints available for the semantic text field, we should only list `sparse_embedding` and `text_embedding` types. <img width="353" alt="image" src="https://github.com/user-attachments/assets/95526f2b-e293-4e01-be79-b87e1ecb9a75"> This PR adds a check to the `data_visualizer/inference_endpoints` endpoint to ensure only `sparse_embedding` and `text_embedding` types are used and they have at least one allocation. NOTE, the allocation check is currently commented out waiting on an es change. elastic/elasticsearch#115095 Also renames the endpoint from `data_visualizer/inference_services` -> `data_visualizer/inference_endpoints` And renames variables which were incorrectly named "service" rather than "endpoint" (cherry picked from commit fb412ca)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Oct 21, 2024
…ing inference endpoints (elastic#196577) When listing the inference endpoints available for the semantic text field, we should only list `sparse_embedding` and `text_embedding` types. <img width="353" alt="image" src="https://github.com/user-attachments/assets/95526f2b-e293-4e01-be79-b87e1ecb9a75"> This PR adds a check to the `data_visualizer/inference_endpoints` endpoint to ensure only `sparse_embedding` and `text_embedding` types are used and they have at least one allocation. NOTE, the allocation check is currently commented out waiting on an es change. elastic/elasticsearch#115095 Also renames the endpoint from `data_visualizer/inference_services` -> `data_visualizer/inference_endpoints` And renames variables which were incorrectly named "service" rather than "endpoint" (cherry picked from commit fb412ca)
prwhelan
approved these changes
Oct 21, 2024
This was referenced Oct 22, 2024
jgowdyelastic
added a commit
to elastic/kibana
that referenced
this pull request
Oct 24, 2024
Enables the previously commented out check for `num_allocations` when listing the inference endpoints. The adaptive allocation count can drop to 0, but it is still valid for use. Uploading a file will cause it to be re-deployed. Related to es PRs elastic/elasticsearch#115233 and elastic/elasticsearch#115095 Follow on from #196577
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Oct 24, 2024
Enables the previously commented out check for `num_allocations` when listing the inference endpoints. The adaptive allocation count can drop to 0, but it is still valid for use. Uploading a file will cause it to be re-deployed. Related to es PRs elastic/elasticsearch#115233 and elastic/elasticsearch#115095 Follow on from elastic#196577 (cherry picked from commit 66b2447)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Oct 24, 2024
Enables the previously commented out check for `num_allocations` when listing the inference endpoints. The adaptive allocation count can drop to 0, but it is still valid for use. Uploading a file will cause it to be re-deployed. Related to es PRs elastic/elasticsearch#115233 and elastic/elasticsearch#115095 Follow on from elastic#196577 (cherry picked from commit 66b2447)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to problems in the GET inference API which should dynamically update the num_allocations field with the actual number from the deployed model. This is required for adaptive allocations where the field will change dynamically.
The
num_allocations
field inservice_settings
is updated with the current value.The first issue is that GroupedActionListener throws if called with size == 0. This is now protected against by skipping the model update if the list is empty.
The second issue is that the wrong field was being updated so the update was not seen in the API response. Tests are added to cover both cases.
Non issue as the code is not live