Skip to content

Conversation

@prwhelan
Copy link
Member

@prwhelan prwhelan commented Jun 9, 2025

Added min and max allocations as attributes to the telemetry for trained models with adaptive allocations enabled.

Added telemetry for models with adaptive allocations disabled or never set.


Verified on QA:
image
image
image

Added min and max allocations as attributes to the telemetry for trained
models with adaptive allocations enabled.

Added telemetry for models with adaptive allocations disabled or never
set.
@prwhelan prwhelan added >enhancement :ml Machine learning Team:ML Meta label for the ML team v9.1.0 labels Jun 9, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @prwhelan, I've created a changelog YAML for you.

@prwhelan prwhelan marked this pull request as ready for review June 9, 2025 20:20
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)


trainedModelsCurrentAllocations += trainedModelAssignment.totalCurrentAllocations();
if (trainedModelAssignment.getAdaptiveAllocationsSettings() == null) {
trainedModelsFixedAllocations += trainedModelAssignment.totalCurrentAllocations();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and in line 518 the code is summing the number of allocations from all deployments that do not use adaptive allocations. A single deployment could have 10 allocations and we wouldn't know if the user has 10 deployments with 1 allocation or 1 deployment with 10.

I think counting the number of deployments would be more meaningful

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that is a good point, we can just do an easy +1 to count the deployments

"es.ml.trained_models.deployment.fixed_allocations.current",
"Sum of current trained model allocations that do not use adaptive allocations (either enabled or disabled)",
"allocations",
() -> new LongWithAttributes(trainedModelAllocationCounts.trainedModelsFixedAllocations, isMasterMap)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the project type be added to the attribute map? If there are different rules for different project types it would be useful to split the data that way

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so? It looks like it comes from serverless.project_type which isn't available here. We could move this metric to serverless, or we can use ES|QL magic to pull in the project type from other metrics via the project id.

It's possible this will get automatically added when running in serverless.

@prwhelan prwhelan enabled auto-merge (squash) June 13, 2025 20:03
@prwhelan prwhelan merged commit b48f699 into elastic:main Jun 13, 2025
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement :ml Machine learning Team:ML Meta label for the ML team v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants