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] Creating category validation package #161261
[ML] Creating category validation package #161261
Conversation
@elasticmachine merge upstream |
Pinging @elastic/ml-ui (:ml) |
Other plugins we maintain are prefixed with either |
Good spot. I missed that the package ids were different to the directory name.
|
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.
Code LGTM, just added some minor comments.
Would be good to get the missing comments/any counts down, stats can be output like this:
node scripts/build_api_docs --plugin @kbn/ml-category-validator --stats comments
node scripts/build_api_docs --plugin @kbn/ml-category-validator --stats any
@@ -0,0 +1,3 @@ | |||
# @kbn/ml-category-validator | |||
|
|||
Empty package generated by @kbn/generate |
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.
Would be good to have a brief description here.
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.
Ah, I missed that. Thanks
Updated in 91de94b
* 2.0. | ||
*/ | ||
|
||
export { categorizationExamplesProvider } from './examples'; |
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: This file might not be necessary, the index.ts
in the root of the package could directly import/export categorizationExamplesProvider
.
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.
Updated in 91de94b
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
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. Good job getting those API counts down to 0!
Added a comment on the format of comments to add a description for params for future reference.
* Retrieves the tokens for the provided examples and analyzer. | ||
* | ||
* @async | ||
* @param {string} indexPatternTitle |
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.
Adding this for reference - note that these will generate the docs, but there will be no description of what the param is. the syntax to use is e.g.
@param {string} indexPatternTitle the title of the index pattern for which to obtain examples
Uses the recently created [category validation package](#161261) to perform validation on the field selected for pattern analysis. If the field is considered unsuitable for categorization, a warning callout is displayed which lists the reasons it is unsuitable. If the field is suitable, no callout is displayed. Other changes: - Adds the selected field to the URL state, so it is remembered on page refresh. - If no field is in the URL, it will look for a field called `message` in the data view and auto select it. - renames the ML route `/jobs/categorization_field_examples` to `/jobs/categorization_field_validation` as it is a more accurate name and it's consistent with the newly added route in AIOPs. **Log Pattern Analysis page in ML** ![image](https://github.com/elastic/kibana/assets/22172091/c0dfda8b-bc34-48b7-9e71-8bae9e65bdf3) **Log Pattern Analysis flyout in Discover** ![image](https://github.com/elastic/kibana/assets/22172091/b4d251f3-bae6-424f-9891-bda57ba1673d) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Moves the server and client side code which performs analysis on data to see whether it is suitable for categorization. This is currently only used by the categorization job wizard to display this callout: ![image](https://github.com/elastic/kibana/assets/22172091/08db5321-0c38-474d-9bfe-90b8a9ad984a) However this analysis will be useful for the Log Pattern Analysis feature and so moving the code to a package allows easier sharing between ML and AIOPs plugins. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Uses the recently created [category validation package](elastic#161261) to perform validation on the field selected for pattern analysis. If the field is considered unsuitable for categorization, a warning callout is displayed which lists the reasons it is unsuitable. If the field is suitable, no callout is displayed. Other changes: - Adds the selected field to the URL state, so it is remembered on page refresh. - If no field is in the URL, it will look for a field called `message` in the data view and auto select it. - renames the ML route `/jobs/categorization_field_examples` to `/jobs/categorization_field_validation` as it is a more accurate name and it's consistent with the newly added route in AIOPs. **Log Pattern Analysis page in ML** ![image](https://github.com/elastic/kibana/assets/22172091/c0dfda8b-bc34-48b7-9e71-8bae9e65bdf3) **Log Pattern Analysis flyout in Discover** ![image](https://github.com/elastic/kibana/assets/22172091/b4d251f3-bae6-424f-9891-bda57ba1673d) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Moves the server and client side code which performs analysis on data to see whether it is suitable for categorization.
This is currently only used by the categorization job wizard to display this callout:
However this analysis will be useful for the Log Pattern Analysis feature and so moving the code to a package allows easier sharing between ML and AIOPs plugins.