[ML] update truncation default & adding field output when input is truncated#79942
Merged
elasticsearchmachine merged 7 commits intoelastic:masterfrom Oct 28, 2021
Merged
Conversation
Collaborator
|
Pinging @elastic/ml-core (Team:ML) |
Member
Author
|
@elasticmachine update branch |
…nt/elasticsearch into feature/ml-update-nlp-truncation
davidkyle
approved these changes
Oct 28, 2021
| @Override | ||
| public int hashCode() { | ||
| return Objects.hash(Arrays.deepHashCode(inference), resultsField); | ||
| int result = Objects.hash(super.hashCode(), resultsField); |
Member
There was a problem hiding this comment.
Suggested change
| int result = Objects.hash(super.hashCode(), resultsField); | |
| return Objects.hash(super.hashCode(), Arrays.deepHashCode(inference), resultsField); |
| @Override | ||
| public int hashCode() { | ||
| return Objects.hash(Arrays.hashCode(inference), resultsField); | ||
| int result = Objects.hash(super.hashCode(), resultsField); |
Member
There was a problem hiding this comment.
Same comment; why not return Objects.hash(super.hashCode(), resultsField, Arrays.hashCode(inference))?
Member
Author
There was a problem hiding this comment.
these were auto generated by Intellij :D. So I can update them.
| int numTokens = withSpecialTokens ? wordPieceTokens.size() + 2 : wordPieceTokens.size(); | ||
| boolean isTruncated = false; | ||
| if (numTokens > maxSequenceLength) { | ||
| isTruncated = true; |
Member
There was a problem hiding this comment.
I would be tempted to put this is the switch case for FIRST & SECOND because NONE does not truncate it throws instead. Same result just a matter of preference
benwtrent
added a commit
to benwtrent/elasticsearch
that referenced
this pull request
Oct 28, 2021
…uncated (elastic#79942) This commit makes the two following changes (along with some refactoring) - Nlp results will now indicate if the input was truncated or not - The default truncation is now `none` instead of `first`
Collaborator
💚 Backport successful
|
weizijun
added a commit
to weizijun/elasticsearch
that referenced
this pull request
Oct 28, 2021
…formance * upstream/master: (153 commits) [ML] update truncation default & adding field output when input is truncated (elastic#79942) [ML] stop using isAllowedByLicense for model license checks (elastic#79908) [ML] Retain built-in ML roles granting Kibana privileges (elastic#80014) [Transform] remove old mixed cluster BWC layers, not required for 8x (elastic#79927) Increase test timeout for CoordinatorTests testAllSearchesExecuted [Transform] add rolling upgrade tests for upgrade endpoint (elastic#79721) [ML] Update trained model docs for truncate parameter for bert tokenization (elastic#79652) `CoordinatorTests` sometimes needs three term bumps (elastic#79574) [ML] Account for service being triggered twice in tests (elastic#80000) SearchContext: remove unused variable (elastic#79917) Revert "Deprecate resolution loss on date field (elastic#78921)" (elastic#79914) Re-enable GeoIpDownloaderIT#testStartWithNoDatabases() (elastic#79907) Fix SnapshotBasedIndexRecoveryIT#testSeqNoBasedRecoveryIsUsedAfterPrimaryFailOver (elastic#79469) Fix RecoverySourceHandlerTests (elastic#79546) SQL: stabilize SqlSearchPageTimeoutIT (elastic#79928) Wait 3 seconds for the server to reload trust (elastic#79778) Skip automatically preserved request headers when rewriting (elastic#79973) Check whether stdout is a real console (elastic#79882) Convert remote license checker to use LicensedFeature (elastic#79876) Miscellaneous fixes for LDAP SDK v6 upgrade (elastic#79891) ... # Conflicts: # libs/x-content/src/main/java/org/elasticsearch/xcontent/support/filtering/FilterPath.java # libs/x-content/src/test/java/org/elasticsearch/xcontent/support/filtering/FilterPathGeneratorFilteringTests.java # libs/x-content/src/test/java/org/elasticsearch/xcontent/support/filtering/FilterPathTests.java
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit makes the two following changes (along with some refactoring)
noneinstead offirst