[ML] Include inference process's RSS memory stat in /_ml/trained_models/_stats output#142312
Merged
darius-vil merged 7 commits intoelastic:mainfrom Feb 25, 2026
Merged
Conversation
/_ml/trained_models/_stats output/_ml/trained_models/_stats output
darius-vil
commented
Feb 12, 2026
|
|
||
| @Override | ||
| protected Response mutateInstanceForVersion(Response instance, TransportVersion version) { | ||
| if (version.supports(MEMORY_STAT_TRANSPORT_VERSION) == false) { |
Contributor
Author
There was a problem hiding this comment.
In case anyone wonders why is this necesssary - without this BWC tests fail and this appears to be necessary
See this file's git history:
d632e63 to
d300753
Compare
d300753 to
b45db20
Compare
darius-vil
commented
Feb 23, 2026
| assert this.lastAccess != null || (inferenceCount == null || inferenceCount == 0); | ||
| } | ||
|
|
||
| public NodeStats( |
Contributor
Author
There was a problem hiding this comment.
This overload is needed for the serverless build to succeed.
b45db20 to
b9a5bf2
Compare
Collaborator
|
Pinging @elastic/ml-core (Team:ML) |
Collaborator
|
Hi @darius-vil, I've created a changelog YAML for you. |
valeriy42
approved these changes
Feb 25, 2026
Contributor
valeriy42
left a comment
There was a problem hiding this comment.
LGTM. A minor comment.
| private final long throughputLastPeriod; | ||
| private final Double avgInferenceTimeLastPeriod; | ||
| private final Long cacheHitCountLastPeriod; | ||
| private final Long avgInferenceProcessMemoryRssBytes; |
Contributor
There was a problem hiding this comment.
add getter method for avgInferenceProcessMemoryRssBytes to maintain consistency with all other fields
Contributor
Author
There was a problem hiding this comment.
I'd rather not, cause there's no use for it now. Most of the other getters exist only to be used in the BWC test.
9936516 to
22160f6
Compare
smalyshev
pushed a commit
to smalyshev/elasticsearch
that referenced
this pull request
Feb 25, 2026
…els/_stats` output (elastic#142312) * Measure rss memory returned from ml-cpp * Change memory stat to average * Add bytes unit to variable names * Fix BWC test * Regenerate transport version * Fix unit test and apply spotless * Fix serverless build
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
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.
Related change in ml-cpp: elastic/ml-cpp#2896
I want to add a new section to inference request's response:
Looks like ml-cpp runs REST tests from the elastic repo, which promptly fail on a new field coming from ml-cpp.
In this case, I think the right order of things is to: