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] cleanup + adding description field to transforms #41554

Conversation

benwtrent
Copy link
Member

There are a couple of places where we import core.ml classes into transforms. I am not sure this is the correct thing to do. There are very few exceptions to the "don't share code between plugins" ideology (one of them is the security plugin). So, I opted to create an ExceptionsHelper class in data frames and use it. Same for TimeUtils

This PR also adds a description field to the data frame transforms.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

LGTM left some minor comments

* Checks that the given {@code timeValue} is a non-negative multiple value of the {@code baseUnit}.
*
* <ul>
* <li>400ms is valid for base unit of seconds</li>
Copy link
Member

Choose a reason for hiding this comment

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

Is this comment correct? Should it be 200ms or 500ms i.e. something that divides 1000ms/1s

* Checks that the given {@code timeValue} is a positive multiple value of the {@code baseUnit}.
*
* <ul>
* <li>400ms is valid for base unit of seconds</li>
Copy link
Member

Choose a reason for hiding this comment

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

Same comment about the comment

@@ -194,6 +195,9 @@ private static XContentBuilder addDataFrameTransformsConfigMappings(XContentBuil
.field(TYPE, KEYWORD)
.endObject()
.endObject()
.endObject()
.startObject(DataFrameTransformConfig.DESCRIPTION.getPreferredName())
.field(TYPE, TEXT)
Copy link
Member

Choose a reason for hiding this comment

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

Text fields are analysed is this what you want

Copy link
Member Author

Choose a reason for hiding this comment

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

@davidkyle, I thought it would be nice to be able to search for dataframe configs via their descriptions. What do you think @hendrikmuhs ?

Choose a reason for hiding this comment

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

sounds reasonable to me to provide full text search for it.

Devil's advocate: Let's limit the size of the description.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will limit it to 1k

@benwtrent benwtrent merged commit 06bc25e into elastic:master Apr 26, 2019
@benwtrent benwtrent deleted the feature/ml-df-adding-transform-config-description branch April 26, 2019 19:41
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Apr 26, 2019
* [ML] cleanup + adding description field to transforms

* making description length have a max of 1k
benwtrent added a commit that referenced this pull request Apr 26, 2019
* [ML] cleanup + adding description field to transforms

* making description length have a max of 1k
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Apr 27, 2019
…ble-map-v1

* elastic/master:
  Adjust bwc version (elastic#41099)
  Fix multi-node parsing in voting config exclusions REST API (elastic#41588)
  Add missing skip: arbitrary_key (elastic#41492)
  [ML] cleanup + adding description field to transforms (elastic#41554)
akhil10x5 pushed a commit to akhil10x5/elasticsearch that referenced this pull request May 2, 2019
* [ML] cleanup + adding description field to transforms

* making description length have a max of 1k
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
* [ML] cleanup + adding description field to transforms

* making description length have a max of 1k
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.

5 participants