-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
[ML] Fix issues in dynamically reading the number of allocations #115095
Open
davidkyle
wants to merge
2
commits into
elastic:8.16
Choose a base branch
from
davidkyle:fix-update-num-allocations
base: 8.16
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+83
−10
Conversation
This file contains 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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