This repository was archived by the owner on Jan 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 530
[DEV] Deprecate specifying Vocab padding, bos and eos_token as positional arguments #945
Merged
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
Codecov Report
@@ Coverage Diff @@
## master #945 +/- ##
==========================================
- Coverage 89.83% 89.81% -0.03%
==========================================
Files 67 67
Lines 6364 6371 +7
==========================================
+ Hits 5717 5722 +5
- Misses 647 649 +2
|
655eaf3
to
6a5c048
Compare
sxjscience
approved these changes
Oct 4, 2019
|
DeprecationWarnings are hidden by default warning filter. This commit explicitly sets the filter to 'default' for DeprecationWarnings raised in GluonNLP code. https://www.python.org/dev/peps/pep-0565/
`**` is interpreted as start-string for strong format.
711f715
to
f367f72
Compare
Job PR-945/8 is complete. |
Sphinx doesn't render it correctly
Job PR-945/10 is complete. |
Job PR-945/11 is complete. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Deprecate specification as positional arguments in preparation for dropping explicit padding_token, bos_token and eos_token arguments in favor of the general kwargs handling of #732.
Checklist
Essentials
Changes
Comments
Vocab(counter)
should still createVocab(size=5, unk="<unk>", reserved="['<pad>', '<bos>', '<eos>']")
or maybeVocab(size=2, unk="<unk>", reserved="[]")
The advantage is that there is nothing special about these 3 special tokens compared to other application specific special tokens; removing the default values simplifies our API. The disadvantage is that such change would affect the vast majority of users and most lines of code that instantiates Vocab. (Note, this is not part of this PR).cc @dmlc/gluon-nlp-team