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.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PretrainedFeatureExtractor] + Wav2Vec2FeatureExtractor, Wav2Vec2Processor, Wav2Vec2Tokenizer #10324
[PretrainedFeatureExtractor] + Wav2Vec2FeatureExtractor, Wav2Vec2Processor, Wav2Vec2Tokenizer #10324
Changes from 4 commits
afe2a24
f70b70e
1b9152e
d135f74
5246685
b6e3d68
b315373
3302c28
8b883fe
93962ca
55d2705
b496346
5239bf7
c17859e
f64f25c
08e3458
ed9543a
dca668a
4c7c013
80edb8b
7189c24
6652130
960c27c
d389a9e
900fee6
7482eee
08b3ac6
e2ae501
bfddc7f
bad66a8
d8ef58f
6b5cc29
d1aa8ea
791fbee
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
All the objects up until here are common objects for our internal use. This is not a modeling file so I would expect all of those to be defined in one place and shared. This is especially important for objects like
TensorType
that are in the main init of transformers and should only be defined in one place.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.
Agree very much actually!
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.
Will move them to
file_utils.py
-> think this is the cleanest option! The other option would be to just import them fromtokenization_utils_base.py
, but I think it's fair to move them since they have become more generic than. just tokenization. I don't think that there is a break in bcp.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.
This class should have some "copied from BatchEncoding" statements (and I think there is a common parent class to write here).
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.
I added some, but I think the only function that really shares more or less all the code is the
to(...)
function -> all other functions are quite different from each other (mainly because there is no_encodings
attribute forBatchFeature
) so think it's ok to not have a common parent class for now?