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

Add a "verbose" option to the data frame analytics stats endpoint #59589

Merged
merged 4 commits into from
Jul 15, 2020

Conversation

przemekwitek
Copy link
Contributor

@przemekwitek przemekwitek commented Jul 15, 2020

The data frame analytics stats endpoint can return extremely verbose information that is only useful if it is plotted on a chart.
This PR adds a ?verbose option to allow the API user to hide some parts of the response.

This is achieved the following way:

  • verbose param is now returned by the RestGetDataFrameAnalyticsStatsAction.responseParams method
  • GetDataFrameAnalyticsStatsAction.Response.toXContent method translates verbose param to for_internal_storage param
  • for_internal_storage param is used by ValidationLoss.toXContent method to either output or hide fold_values field.

The change is a no-op to indexing code (as it sets for_internal_storage param to true). It only affects _stats endpoint.

The only field that this PR allows to hide is fold_values. All the other fields in the _stats response have bounded size (are not arrays nor lists) so I think the user cannot gain much by hiding them.

Relates #59125

@przemekwitek przemekwitek force-pushed the dfa_stats_verbose branch 2 times, most recently from 2bb587b to 7eeb1c4 Compare July 15, 2020 08:45
@przemekwitek przemekwitek removed the WIP label Jul 15, 2020
@przemekwitek przemekwitek marked this pull request as ready for review July 15, 2020 09:13
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

Copy link
Contributor

@dimitris-athanasiou dimitris-athanasiou left a comment

Choose a reason for hiding this comment

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

LGTM

@przemekwitek
Copy link
Contributor Author

run elasticsearch-ci/bwc

@przemekwitek
Copy link
Contributor Author

run elasticsearch-ci/default-distro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants