[ML] Fix issues in dynamically reading the number of allocations #115095
+83
−10
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 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