Skip to content
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

Fixing missing arguments for TransfoXL tokenizer when using TextGenerationPipeline #5465

Merged
merged 6 commits into from Jul 2, 2020

Conversation

TevenLeScao
Copy link
Contributor

As discussed with @LysandreJik and @mfuntowicz , TextGenerationPipeline gives imperfect results when using TransfoXL as the tokenizer lacks the add_space_before_punct_symbol argument. In order to fix this, this PR overrides _parse_and_tokenize for this pipeline in order to pass tokenizer arguments.

@codecov
Copy link

codecov bot commented Jul 2, 2020

Codecov Report

Merging #5465 into master will decrease coverage by 0.12%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5465      +/-   ##
==========================================
- Coverage   77.52%   77.40%   -0.13%     
==========================================
  Files         141      141              
  Lines       24610    24617       +7     
==========================================
- Hits        19079    19054      -25     
- Misses       5531     5563      +32     
Impacted Files Coverage Δ
src/transformers/pipelines.py 76.00% <85.71%> (+0.11%) ⬆️
src/transformers/tokenization_albert.py 28.84% <0.00%> (-58.66%) ⬇️
src/transformers/generation_utils.py 96.82% <0.00%> (-0.29%) ⬇️
src/transformers/file_utils.py 79.59% <0.00%> (+0.33%) ⬆️
src/transformers/configuration_utils.py 96.40% <0.00%> (+0.71%) ⬆️
src/transformers/tokenization_auto.py 97.77% <0.00%> (+2.22%) ⬆️
src/transformers/tokenization_xlm_roberta.py 95.23% <0.00%> (+33.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6726416...25f8c86. Read the comment docs.

Copy link
Member

@mfuntowicz mfuntowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@TevenLeScao TevenLeScao merged commit c6a510c into huggingface:master Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants