-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Use random sampler for field statistics table in Discover and Data visualizer #138953
Closed
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
0fa735a
[ML] Use random sampler for field stats
qn895 fb6e112
[ML] Use random sampler for field stats 2
qn895 7b2b265
[ML] Fix count not matching in summary table
qn895 5fbc10b
Add logic for Discover side management
qn895 e4f786e
Clean up
qn895 2bd9db0
Set probability to required
qn895 1148f84
Fix total count for file upload, numeric requests broken, fix types
qn895 8f83d50
Merge remote-tracking branch 'upstream/main' into ml-dv-random-sample…
qn895 e775c8b
Fix time field
qn895 88f59ec
Fix time field
qn895 74c5b71
Separate start and cancel hooks
qn895 4a65785
Remove samplerShardSize control
qn895 b1f9521
Remove references to samplerShardSize
qn895 a72670c
Remove references to topValuesSamplerSize
qn895 b5ff7b0
Update tests
qn895 1a26cb1
Merge remote-tracking branch 'upstream/main' into ml-dv-random-sample…
qn895 757c4a5
Update tests
qn895 3a2fff6
Fix logic for indices without time field, fix translations
qn895 a200eba
Merge branch 'ml-dv-random-sampler-table' of https://github.com/qn895…
qn895 b5766ee
Fix linting
qn895 5ab3c2d
Add clarifying comment for threshold
qn895 75b2944
Merge remote-tracking branch 'upstream/main' into ml-dv-random-sample…
qn895 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
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
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
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 |
---|---|---|
|
@@ -44,14 +44,7 @@ function getPercentLabel(docCount: number, topValuesSampleSize: number): string | |
|
||
export const TopValues: FC<Props> = ({ stats, fieldFormat, barColor, compressed, onAddFilter }) => { | ||
if (stats === undefined || !stats.topValues) return null; | ||
const { | ||
topValues, | ||
topValuesSampleSize, | ||
topValuesSamplerShardSize, | ||
count, | ||
isTopValuesSampled, | ||
fieldName, | ||
} = stats; | ||
const { topValues, topValuesSampleSize, count, isTopValuesSampled, fieldName } = stats; | ||
|
||
const progressBarMax = isTopValuesSampled === true ? topValuesSampleSize : count; | ||
return ( | ||
|
@@ -154,9 +147,9 @@ export const TopValues: FC<Props> = ({ stats, fieldFormat, barColor, compressed, | |
<EuiText size="xs" textAlign={'center'}> | ||
<FormattedMessage | ||
id="xpack.dataVisualizer.dataGrid.field.topValues.calculatedFromSampleDescription" | ||
defaultMessage="Calculated from sample of {topValuesSamplerShardSize} documents per shard" | ||
defaultMessage="Calculated from sample of {topValuesSampleSize} documents" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
values={{ | ||
topValuesSamplerShardSize, | ||
topValuesSampleSize, | ||
}} | ||
/> | ||
</EuiText> | ||
|
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
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
66 changes: 0 additions & 66 deletions
66
...er/public/application/index_data_visualizer/components/search_panel/shard_size_select.tsx
This file was deleted.
Oops, something went wrong.
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.
For a data view without a time field, you get
Infinity %
for percentages in the document stats and top values: