-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[8.6][ML Inference] New API to fetch ML inference errors #142799
[8.6][ML Inference] New API to fetch ML inference errors #142799
Conversation
…jened/kibana into create-ml-inference-pipeline
…-ref HEAD~1..HEAD --fix'
…-ref HEAD~1..HEAD --fix'
…-ref HEAD~1..HEAD --fix'
…-ref HEAD~1..HEAD --fix'
…-ref HEAD~1..HEAD --fix'
ec53fe6
to
60360fe
Compare
8d5c1f9
to
d7b98f5
Compare
…-ref HEAD~1..HEAD --fix'
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
|
||
import { ElasticsearchClient } from '@kbn/core/server'; | ||
|
||
export interface MlInferenceError { |
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.
This should be defined in the common/types
folder so we can import it from the frontend when calling this API.
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.
I'll refactor this in the frontend follow-up PR.
|
||
import { ElasticsearchClient } from '@kbn/core/server'; | ||
|
||
export interface MlInferenceError { |
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.
I'll refactor this in the frontend follow-up PR.
const searchResult = await esClient.search< | ||
unknown, | ||
{ | ||
errors: AggregationsMultiBucketAggregateBase<ErrorAggregationBucket>; |
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.
Why is there a semicolon at the end of this line? 🤔
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.
It is a type declaration, so it follows the same pattern similar to the line 21
) * Add ML inference PL creation flow * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * Add exists check, clean up code a bit * Fix dest name * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * Separate concerns * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Remove i18n due to linter error, fix src field ref * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Add/update unit tests * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Refactor error handling * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * Add sub-pipeline to parent ML PL * Add unit tests and docs * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * Refactor error handling * Wrap logic into higher level function * Add route test * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * API to fetch inference errors * Minor style changes * Add unit tests * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' Co-authored-by: kibanamachine <[email protected]>
) * Add ML inference PL creation flow * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * Add exists check, clean up code a bit * Fix dest name * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * Separate concerns * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Remove i18n due to linter error, fix src field ref * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Add/update unit tests * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Refactor error handling * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * Add sub-pipeline to parent ML PL * Add unit tests and docs * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * Refactor error handling * Wrap logic into higher level function * Add route test * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * API to fetch inference errors * Minor style changes * Add unit tests * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' Co-authored-by: kibanamachine <[email protected]>
Summary
This PR adds a new endpoint for fetching aggregated ML inference errors from the target index. It returns the error message, affected document count, and the last error's timestamp for each distinct error.
Endpoint
Sample response
Checklist