Skip to content
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] Removing counter fields from wizards #153639

Merged

Conversation

jgowdyelastic
Copy link
Member

@jgowdyelastic jgowdyelastic commented Mar 24, 2023

Further improvements to the anomaly detection and data frame analysts wizards to ensure counter fields cannot be selected when configuring a new job.
Adds a counter flag to the new_job_caps response which is used to remove counter fields from dropdowns in the DFA and advanced AD wizards.

The outlier detection wizard still has an issue caused by the call to the _explain endpoint. This needs to be fixed in elasticsearch elastic/elasticsearch#94691

@jgowdyelastic jgowdyelastic requested review from peteharverson, alvarezmelissa87 and qn895 and removed request for alvarezmelissa87 March 28, 2023 12:00
@jgowdyelastic jgowdyelastic self-assigned this Mar 28, 2023
@jgowdyelastic jgowdyelastic added :ml Feature:Anomaly Detection ML anomaly detection release_note:skip Skip the PR/issue when compiling release notes Feature:Data Frame Analytics ML data frame analytics features v8.8.0 labels Mar 28, 2023
@jgowdyelastic jgowdyelastic marked this pull request as ready for review March 28, 2023 12:06
@jgowdyelastic jgowdyelastic requested a review from a team as a code owner March 28, 2023 12:06
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@qn895
Copy link
Member

qn895 commented Mar 28, 2023

Not sure if this is out of scope of this PR, but we should add this logic for the histogram fetching as well? Running into this error when using the DFA wizard:

Screen Shot 2023-03-28 at 09 54 47

For outlier detection, should we disable counter fields? Currenty, including them will yield a validation error.

Screen Shot 2023-03-28 at 09 59 17

Screen.Recording.2023-03-28.at.09.56.28.mov

@jgowdyelastic
Copy link
Member Author

Not sure if this is out of scope of this PR, but we should add this logic for the histogram fetching as well? Running into this error when using the DFA wizard:

Screen Shot 2023-03-28 at 09 54 47

For outlier detection, should we disable counter fields? Currenty, including them will yield a validation error.

Screen Shot 2023-03-28 at 09 59 17

@qn895 I'm not able to reproduce these errors, the counter field never present for me?

image

@jgowdyelastic
Copy link
Member Author

jgowdyelastic commented Mar 29, 2023

@qn895 I've pushed an update which cleans up the code a bit and removes the errors thrown when loading the histograms.
Counter fields are no longer sent to the histogram endpoint.
There is still a problem with the field selection table showing counter fields for selection, however this will hopefully be fixed by the backend change for the explain api. This table is populated by the explain api, and not from the same data which populates the histogram table above it.
IMO the explain api should mark counter fields as is_included: false so they are not selectable in the UI.

@qn895
Copy link
Member

qn895 commented Mar 29, 2023

Tested latest changes and LGTM 🎉 Seeing counter fields in the included fields but I suppose that would be fixed when elastic/elasticsearch#94691 is addressed.

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested latest changes and LGTM.

If / when Elasticsearch includes supported aggregations in the field caps api response (see elastic/elasticsearch#93884) we could look to allow certain aggregations to be used in the wizards for counter fields.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ml 3.4MB 3.4MB +386.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 432 435 +3

Total ESLint disabled count

id before after diff
securitySolution 512 515 +3

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jgowdyelastic

@jgowdyelastic jgowdyelastic merged commit 662507b into elastic:main Apr 3, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Anomaly Detection ML anomaly detection Feature:Data Frame Analytics ML data frame analytics features :ml release_note:skip Skip the PR/issue when compiling release notes v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants