-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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] Add _cat/ml/anomaly_detectors API #51364
Conversation
Pinging @elastic/ml-core (:ml) |
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.
LGTM, 2 typos and a nit
.build()); | ||
table.addCell("data.buckets", | ||
TableColumnAttributeBuilder.builder("total bucket count", false) | ||
.setAliases("db", "dataBuckes") |
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.
dataBuckes: missing "t"
.build()); | ||
table.addCell("data.empty_buckets", | ||
TableColumnAttributeBuilder.builder("number of empty buckets", false) | ||
.setAliases("deb", "dataEmptyBuckes") |
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.
dataBuckes: missing "t"
table.addCell(modelSizeStats == null ? null : modelSizeStats.getTimestamp()); | ||
|
||
ForecastStats forecastStats = job.getForecastStats(); | ||
table.addCell(forecastStats == null ? null : forecastStats.getTotal()); |
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.
nit: a bool to avoid repeating forecastStats == null || forecastStats.getTotal() <= 0L
for every cell?
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.
For sure :). I was in fast editing mode (yy 7p
) and tons of line duplications.
I'm a great fan of using the _cat lists to grab quick info on indices, snapshots etc. With that in mind, I would propose we simplify the call and remove the In the same way that The column selection seems good for the anomaly detection job list. As we extend this to other ML components, there is great potential here to simplify tasks in Dev Tools when working with transforms -> data frame analytics -> trained models -> inference ... answering quick questions such as "What trained models do I have?". Will this be available in Dev Tools auto complete? |
It can be. I am not sure how automatic that process is. |
Best to my knowledge: Completions are done via some script that runs over the REST specs. I do not know how often this is done. Afaik its not fully automated but executed manually on a regular basis. That means, if you do nothing completions will be eventually there (given REST specs are in place).[*] To speed up the process you can open an issue, however it means extra work for both sides. [*] Happened to me for 1 feature: I did not explicitly requested autocomplete and was happy to see it without me doing anything |
* [ML] Add _cat/ml/anomaly_detectors/_stats * addressing PR feedback
Adds new
_cat/ml/anomaly_detectors
and_cat/ml/anomaly_detectors/{job_id}
endpointsExample output:
Same call but sorted
For specific jobs and only specific fields
All other typical settings are supported as well.
Help output