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] Anomaly detection wizard validation should run a datafeed _preview #93771

Closed
benwtrent opened this issue Mar 5, 2021 · 5 comments · Fixed by #109080
Closed

[ML] Anomaly detection wizard validation should run a datafeed _preview #93771

benwtrent opened this issue Mar 5, 2021 · 5 comments · Fixed by #109080
Assignees
Labels
enhancement New value added to drive a business result Feature:Anomaly Detection ML anomaly detection :ml v7.16.0

Comments

@benwtrent
Copy link
Member

Describe the feature:

At the end of the wizards before the job is created, a datafeed _preview should be ran as part of the validations. This will catch bad queries + aggs as the user is not REQUIRED to preview their data after modifying the JSON directly.

Describe a specific use case for the feature:

If the user modifies the datafeed JSON directly to add custom aggregations, there is no validation of the changes unless the user refreshes their data preview themselves. It would be good to capture these silly syntax mistakes before trying to create the datafeed.

@benwtrent benwtrent added enhancement New value added to drive a business result :ml Feature:Anomaly Detection ML anomaly detection labels Mar 5, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@benwtrent
Copy link
Member Author

I noticed this while creating a datafeed + job in the Adv. Wizard.

I am not sure if all the wizards use the same validation path or not.

@jgowdyelastic
Copy link
Member

jgowdyelastic commented Mar 5, 2021

The preview could be called as part of the validation step but seeing as the JSON can be edited on the very last step of the wizard, after the validation, it might make sense to run the preview automatically when the user saves changes to the JSON.

Also it's worth noting, the _preview endpoint only works for existing jobs. The preview available in the wizard is a standard es search made from properties in the datafeed to best emulate what the _preview endpoint would do.
I believe there is a plan to enhance the _preview endpoint so it can be run with supplied job and datafeed configs. I could not find an issue for this.

@benwtrent
Copy link
Member Author

I believe there is a plan to enhance the _preview endpoint so it can be run with supplied job and datafeed configs. I could not find an issue for this.

Ah, it would be good to add a preview like that.

@benwtrent
Copy link
Member Author

@jgowdyelastic take a look at the new _preview action.

elastic/elasticsearch#70836

With a valid job (with detectors, and datafeed, etc.) the true preview is now available.

Would be cool to add a preview action in the wizard after the job is created (or while it is being created).

And definitely one in the validation window (that shows the true data preview and any errors)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Anomaly Detection ML anomaly detection :ml v7.16.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants