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

[DataCollatorForLanguageModeling] fix labels #6213

Merged
merged 1 commit into from
Aug 3, 2020

Conversation

patil-suraj
Copy link
Contributor

This PR fixes #6211. Only set ignore index (-100) when pad_token_id is not None

@sgugger

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@codecov
Copy link

codecov bot commented Aug 3, 2020

Codecov Report

Merging #6213 into master will decrease coverage by 0.38%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6213      +/-   ##
==========================================
- Coverage   79.66%   79.27%   -0.39%     
==========================================
  Files         146      146              
  Lines       26582    26583       +1     
==========================================
- Hits        21176    21075     -101     
- Misses       5406     5508     +102     
Impacted Files Coverage Δ
src/transformers/data/data_collator.py 96.58% <50.00%> (-0.84%) ⬇️
src/transformers/modeling_tf_distilbert.py 64.40% <0.00%> (-34.39%) ⬇️
src/transformers/tokenization_roberta.py 76.71% <0.00%> (-21.92%) ⬇️
src/transformers/tokenization_utils_base.py 86.43% <0.00%> (-7.42%) ⬇️
src/transformers/tokenization_transfo_xl.py 38.73% <0.00%> (-3.76%) ⬇️
src/transformers/tokenization_utils_fast.py 92.14% <0.00%> (-2.15%) ⬇️
src/transformers/tokenization_openai.py 82.57% <0.00%> (-1.52%) ⬇️
src/transformers/tokenization_bert.py 90.86% <0.00%> (-0.46%) ⬇️
src/transformers/tokenization_utils.py 90.00% <0.00%> (-0.41%) ⬇️
src/transformers/file_utils.py 80.05% <0.00%> (-0.26%) ⬇️
... and 3 more

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 9996f69...a0d4291. Read the comment docs.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @patil-suraj

@LysandreJik LysandreJik merged commit 0b41867 into huggingface:master Aug 3, 2020
Mehrad0711 pushed a commit to Mehrad0711/transformers that referenced this pull request Aug 3, 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.

Error when fine tuning GPT2 on GPU
3 participants