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] Data frame analytics _explain API should not fail when none field is included #66281

Conversation

dimitris-athanasiou
Copy link
Contributor

This commit fixes an issue with DFA _explain API where if it is called
and no field is included, it results to an error message coming from
the c++ process due to the data frame having no columns.

We want the _explain API not to error when no fields are included
exactly in order to explain to the user why it is that no fields
are included. Thus, we can simply fix this by not running the
memory estimation process and returning zero estimates instead.

Note that the _start API will fail with a user friendly error message
that informs there are no included fields.

This commit fixes an issue with DFA _explain API where if it is called
and no field is included, it results to an error message coming from
the c++ process due to the data frame having no columns.

We want the _explain API not to error when no fields are included
exactly in order to explain to the user why it is that no fields
are included. Thus, we can simply fix this by not running the
memory estimation process and returning zero estimates instead.

Note that the _start API will fail with a user friendly error message
that informs there are no included fields.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

@dimitris-athanasiou dimitris-athanasiou merged commit bbf76c6 into elastic:master Dec 14, 2020
@dimitris-athanasiou dimitris-athanasiou deleted the improve-error-msg-when-explain-dfa-encounters-no-features branch December 14, 2020 18:55
dimitris-athanasiou added a commit to dimitris-athanasiou/elasticsearch that referenced this pull request Dec 14, 2020
elastic#66281)

This commit fixes an issue with DFA _explain API where if it is called
and no field is included, it results to an error message coming from
the c++ process due to the data frame having no columns.

We want the _explain API not to error when no fields are included
exactly in order to explain to the user why it is that no fields
are included. Thus, we can simply fix this by not running the
memory estimation process and returning zero estimates instead.

Note that the _start API will fail with a user friendly error message
that informs there are no included fields.

Backport of elastic#66281
dimitris-athanasiou added a commit that referenced this pull request Dec 14, 2020
#66281) (#66288)

This commit fixes an issue with DFA _explain API where if it is called
and no field is included, it results to an error message coming from
the c++ process due to the data frame having no columns.

We want the _explain API not to error when no fields are included
exactly in order to explain to the user why it is that no fields
are included. Thus, we can simply fix this by not running the
memory estimation process and returning zero estimates instead.

Note that the _start API will fail with a user friendly error message
that informs there are no included fields.

Backport of #66281
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Dec 14, 2020
* elastic/master: (33 commits)
  Add searchable snapshot cache folder to NodeEnvironment (elastic#66297)
  [DOCS] Add dynamic runtime fields to docs (elastic#66194)
  Add HDFS searchable snapshot integration (elastic#66185)
  Support canceling cross-clusters search requests (elastic#66206)
  Mute testCacheSurviveRestart (elastic#66289)
  Fix cat tasks api params in spec and handler (elastic#66272)
  Snapshot of a searchable snapshot should be empty (elastic#66162)
  [ML] DFA _explain API should not fail when none field is included (elastic#66281)
  Add action to decommission legacy monitoring cluster alerts (elastic#64373)
  move rollup_index param out of RollupActionConfig (elastic#66139)
  Improve FieldFetcher retrieval of fields (elastic#66160)
  Remove unsed fields in `RestAnalyzeAction` (elastic#66215)
  Simplify searchable snapshot CacheKey (elastic#66263)
  Autoscaling remove feature flags (elastic#65973)
  Improve searchable snapshot mount time (elastic#66198)
  [ML] Report cause when datafeed extraction encounters error (elastic#66167)
  Remove suggest reference in some API specs (elastic#66180)
  Fix warning when installing a plugin for different ESversion (elastic#66146)
  [ML] make `xpack.ml.max_ml_node_size` and `xpack.ml.use_auto_machine_memory_percent` dynamically settable (elastic#66132)
  [DOCS] Add `require_alias` to Bulk API (elastic#66259)
  ...
@droberts195 droberts195 changed the title [ML] DFA _explain API should not fail when none field is included [ML] Data frame analytics _explain API should not fail when none field is included Jan 18, 2021
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