Filtering empty text examples - #1222
Conversation
mattsetz
left a comment
There was a problem hiding this comment.
looks good! do we expect this will slow down dataloading time to tokenize examples one by one? or maybe its minimal bc the tokenization is so fast?
| @staticmethod | ||
| def add_tokenization_pipeline( | ||
| builder: DataPipelineBuilder, | ||
| tokenizer: TextTokenizer, |
There was a problem hiding this comment.
we can add another arg here remove_unk to optionally remove all UNKs tokens from transcript. we should default this to False but it can be something that we experiment with.
There was a problem hiding this comment.
also, maybe we can log the number of UNKs (or % of num_unks/total_tokens within a sample/batch) in weights and biases? its useful for us to know if our dataset contains too many UNKs.
There was a problem hiding this comment.
also, maybe we can log the number of UNKs (or % of
num_unks/total_tokenswithin a sample/batch) in weights and biases? its useful for us to know if our dataset contains too many UNKs.
it's possible (requires a bit to propagate some metric bags to data reader) but for now we can just do in a adhoc analysis
There was a problem hiding this comment.
we can add another arg here
remove_unkto optionally remove all UNKs tokens from transcript. we should default this to False but it can be something that we experiment with.
done !
there'll not be slowdown in the iterations (still need to do tokenization just in different order), but it will slightly increase the starting time. Tokenization is rather fast (>200k tokens /sec) |
* filter empty text examples asr dataloading * comment * flake8 * early exit * isort * rm UNK with option --------- Co-authored-by: Artyom Kozhevnikov <artyomko@fb.com>
What does this PR do? Please describe:
Removing empty text examples in ASR dataloaders
Does your PR introduce any breaking changes? If yes, please list them:
List of all backwards-incompatible changes.
Check list: