-
Notifications
You must be signed in to change notification settings - Fork 915
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
Remove metadata singleton from nvtext normalizer #10090
Merged
rapids-bot
merged 9 commits into
rapidsai:branch-22.04
from
davidwendt:bug-normalize-mem-error
Jan 26, 2022
Merged
Remove metadata singleton from nvtext normalizer #10090
rapids-bot
merged 9 commits into
rapidsai:branch-22.04
from
davidwendt:bug-normalize-mem-error
Jan 26, 2022
Conversation
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
davidwendt
added
bug
Something isn't working
3 - Ready for Review
Ready for review by team
libcudf
Affects libcudf (C++/CUDA) code.
strings
strings issues (C++ and Python)
non-breaking
Non-breaking change
labels
Jan 20, 2022
ttnghia
reviewed
Jan 21, 2022
ttnghia
reviewed
Jan 21, 2022
ttnghia
reviewed
Jan 21, 2022
ttnghia
approved these changes
Jan 21, 2022
Codecov Report
@@ Coverage Diff @@
## branch-22.04 #10090 +/- ##
================================================
+ Coverage 10.37% 10.42% +0.04%
================================================
Files 119 119
Lines 20149 20602 +453
================================================
+ Hits 2091 2148 +57
- Misses 18058 18454 +396
Continue to review full report at Codecov.
|
robertmaynard
requested changes
Jan 26, 2022
ttnghia
reviewed
Jan 26, 2022
robertmaynard
approved these changes
Jan 26, 2022
@gpucibot merge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3 - Ready for Review
Ready for review by team
bug
Something isn't working
libcudf
Affects libcudf (C++/CUDA) code.
non-breaking
Non-breaking change
strings
strings issues (C++ and Python)
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.
Closes #10043
A metadata singleton was allocated from the current rmm memory-resource inside the nvtext normalizer functions. If the memory resource is later changed, the metadata pointer may become invalidated. This PR removes the singleton pattern.
The normalizer is used by the subword-tokenizer which is passed a vocabulary structure that is built only once and is maintained by the caller. The metadata has been added to this structure so it's lifetime can share the same scope.
The normalizer can also be called directly through the
nvtext::normalize_characters
API. Here the metadata table (size about 1MB) is now created on each call. This showed only significant performance impact on benchmarks testing a small number (<50K) of shorter strings.