-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat: ML Model Backend Implementation #1896
Merged
shirshanka
merged 33 commits into
datahub-project:master
from
RyanHolstien:feature/DATAHUB-1877-MLModelBackendImpl
Feb 17, 2021
Merged
Changes from 9 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
7b724a5
Merge pull request #1 from linkedin/master
RyanHolstien 8475ad3
Merge pull request #2 from linkedin/master
RyanHolstien c18c55b
Merge pull request #3 from linkedin/master
RyanHolstien dc474a7
Merge pull request #4 from linkedin/master
RyanHolstien c7d519c
feat(1877): add backend implementation for ML Model
d347b96
Merge branch 'master' into feature/DATAHUB-1877-MLModelBackendImpl
81a342e
Merge pull request #5 from linkedin/master
RyanHolstien 02a9970
Merge branch 'master' into feature/DATAHUB-1877-MLModelBackendImpl
26a2908
update mce cli examples
8c897fb
changes for review comments
87ab115
modify owners field in index per review comments
938b8d2
Merge pull request #6 from linkedin/master
RyanHolstien 42dc2f5
Merge branch 'master' into feature/DATAHUB-1877-MLModelBackendImpl
10f5d89
update package of GMS factories and use BaseSearchableClient
29eab26
fix for checkstyle
391304c
remove unused comma analyzers and tokenizers
3ad1b2f
Merge pull request #7 from linkedin/master
RyanHolstien 912b2a6
Merge branch 'master' into feature/DATAHUB-1877-MLModelBackendImpl
69bbcbd
fix endpoint naming for evaluation data
059def7
fixes for IndexBuilder per review comments
2bc1963
update IndexBuilder with efficient setting of urn derived fields
075ecfa
remove unnecessary filters and fields from index builder and relation…
3f83e7f
Merge pull request #8 from linkedin/master
RyanHolstien 21b3c23
Merge branch 'master' into feature/DATAHUB-1877-MLModelBackendImpl
5646b85
remove unused imports, fix formatting, and add new integration test t…
8215a60
add custom analyzer to split up URN components and fix typos
25daf59
update query template to include urn components
1735ff3
consolidate query template to one operator
ea9434c
Merge pull request #9 from linkedin/master
RyanHolstien 86b54cb
Merge branch 'master' into feature/DATAHUB-1877-MLModelBackendImpl
f4e27af
update sanity test to master
22c233b
Merge pull request #10 from linkedin/master
RyanHolstien c2dbf80
Merge branch 'master' into feature/DATAHUB-1877-MLModelBackendImpl
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,212 @@ | ||
{ | ||
"settings": { | ||
"index": { | ||
"analysis": { | ||
"filter": { | ||
"autocomplete_filter": { | ||
"type": "edge_ngram", | ||
"min_gram": "3", | ||
"max_gram": "50" | ||
}, | ||
"custom_delimiter": { | ||
"split_on_numerics": "false", | ||
"split_on_case_change": "false", | ||
"type": "word_delimiter", | ||
"preserve_original": "true", | ||
"catenate_words": "false" | ||
} | ||
}, | ||
"char_filter": { | ||
"ml_model_pattern": { | ||
"pattern": "[.]", | ||
"type": "pattern_replace", | ||
"replacement": "/" | ||
} | ||
}, | ||
"normalizer": { | ||
"my_normalizer": { | ||
"filter": [ | ||
"lowercase" | ||
], | ||
"type": "custom" | ||
} | ||
}, | ||
"analyzer": { | ||
"whitespace_lowercase": { | ||
jywadhwani marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"filter": [ | ||
"lowercase" | ||
], | ||
"tokenizer": "whitespace" | ||
}, | ||
"slash_pattern": { | ||
"filter": [ | ||
"lowercase" | ||
], | ||
"type": "custom", | ||
"tokenizer": "slash_tokenizer" | ||
}, | ||
"ml_model_pattern": { | ||
"filter": [ | ||
"lowercase" | ||
], | ||
"type": "custom", | ||
"tokenizer": "ml_model_pattern" | ||
}, | ||
"comma_pattern": { | ||
"filter": [ | ||
"lowercase" | ||
], | ||
"type": "custom", | ||
"tokenizer": "comma_tokenizer" | ||
}, | ||
"custom_browse": { | ||
"filter": [ | ||
"lowercase" | ||
], | ||
"type": "custom", | ||
"tokenizer": "path_hierarchy_tokenizer" | ||
}, | ||
"custom_ngram": { | ||
"filter": [ | ||
"lowercase" | ||
], | ||
"type": "custom", | ||
"tokenizer": "custom_ngram" | ||
}, | ||
"custom_keyword": { | ||
"filter": [ | ||
"lowercase" | ||
], | ||
"type": "custom", | ||
"tokenizer": "keyword" | ||
}, | ||
"comma_pattern_ngram": { | ||
"filter": [ | ||
"lowercase", | ||
"autocomplete_filter" | ||
], | ||
"type": "custom", | ||
"tokenizer": "comma_tokenizer" | ||
}, | ||
"delimit": { | ||
"filter": [ | ||
"lowercase", | ||
"custom_delimiter" | ||
], | ||
"tokenizer": "whitespace" | ||
}, | ||
"ml_model_pattern_ngram": { | ||
"filter": [ | ||
"lowercase", | ||
"autocomplete_filter" | ||
], | ||
"type": "custom", | ||
"tokenizer": "ml_model_pattern" | ||
}, | ||
"custom_browse_slash": { | ||
"filter": [ | ||
"lowercase" | ||
], | ||
"type": "custom", | ||
"tokenizer": "path_hierarchy" | ||
} | ||
}, | ||
"tokenizer": { | ||
"path_hierarchy_tokenizer": { | ||
"type": "path_hierarchy", | ||
"replacement": "/", | ||
"delimiter": "." | ||
}, | ||
"custom_ngram": { | ||
"type": "ngram", | ||
"min_gram": "3", | ||
"max_gram": "50" | ||
}, | ||
"slash_tokenizer": { | ||
"pattern": "[/]", | ||
"type": "pattern" | ||
}, | ||
"comma_tokenizer": { | ||
"pattern": ",", | ||
"type": "pattern" | ||
}, | ||
"ml_model_pattern": { | ||
"pattern": "[./]", | ||
"type": "pattern" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"mappings": { | ||
"doc": { | ||
"properties": { | ||
"browsePaths": { | ||
"type": "text", | ||
"fields": { | ||
"length": { | ||
"type": "token_count", | ||
"analyzer": "slash_pattern" | ||
} | ||
}, | ||
"analyzer": "custom_browse_slash", | ||
"fielddata": true | ||
}, | ||
"origin": { | ||
"type": "keyword", | ||
"fields": { | ||
"ngram": { | ||
"type": "text", | ||
"analyzer": "custom_ngram" | ||
} | ||
}, | ||
"normalizer": "my_normalizer" | ||
}, | ||
"hasOwners": { | ||
"type": "boolean" | ||
}, | ||
"name": { | ||
"type": "keyword" | ||
}, | ||
"num_inputs": { | ||
jywadhwani marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"type": "long" | ||
}, | ||
"num_outputs": { | ||
"type": "long" | ||
}, | ||
"owners": { | ||
"type": "text", | ||
"fields": { | ||
"ngram": { | ||
"type": "text", | ||
"analyzer": "comma_pattern_ngram" | ||
} | ||
}, | ||
"analyzer": "comma_pattern" | ||
}, | ||
"orchestrator": { | ||
"type": "keyword", | ||
"fields": { | ||
"ngram": { | ||
"type": "text", | ||
"analyzer": "custom_ngram" | ||
} | ||
}, | ||
"normalizer": "my_normalizer" | ||
}, | ||
"urn": { | ||
"type": "keyword", | ||
"normalizer": "my_normalizer" | ||
}, | ||
"inputs": { | ||
"type": "keyword", | ||
"normalizer": "my_normalizer" | ||
}, | ||
"outputs": { | ||
"type": "keyword", | ||
"normalizer": "my_normalizer" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we using this character filter anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The char_filter here gets used on every ml_model_pattern (used in the name field). What it does is replace all the dots with slashes, why it does this or what the significance of it is, I'm not exactly sure, I copied it from Dataset. It doesn't seem to be used from what I can tell. It would make sense for example if the slash pattern got utilized with this character filter as it would allow for tokenizing of a name like "aws_us_east_1.modelName" (which would get pattern replace to aws_us_east_1/modelName and then be two separate tokens from splitting on the slash) or something like that, but the ml_model_pattern and its analogue dataset_pattern support tokenizing on both slashes and dots.
Do you have any insight from the LinkedIn side why dots are undesirable in the name field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are couple of issues I can see here with the mappings and settings. It will be great if you can confirm the same
name
field is usingmodel_pattern
analyzer but that doesn't seem to be defined anywhere? I do seeml_model_pattern
analyzer being defined but notmodel_pattern
analyzer.ml_model_pattern
analyzer makes use ofml_model_pattern
tokenizer but where are we using the char_filterml_model_pattern
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To answer your question on why we replaced dots with slashes in datasets is to support browse feature. We chose this uniform standard since some datasets name were of form
foo.bar
while others of form/foo/bar
. You don't need this in your settings/mappings if you don't intend to support browse.This also means that we should improve our documentation :) Thanks for the question.