Skip to content

Conversation

@patrickvonplaten
Copy link
Contributor

Add better explanation to T5 lm_labels dosctring.

@codecov-io
Copy link

Codecov Report

Merging #3529 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3529      +/-   ##
==========================================
+ Coverage   77.80%   77.81%   +0.01%     
==========================================
  Files         100      100              
  Lines       17062    17062              
==========================================
+ Hits        13275    13277       +2     
+ Misses       3787     3785       -2     
Impacted Files Coverage Δ
src/transformers/modeling_t5.py 81.52% <ø> (ø)
src/transformers/modeling_tf_t5.py 94.98% <ø> (ø)
src/transformers/modeling_utils.py 91.94% <0.00%> (+0.13%) ⬆️
src/transformers/modeling_tf_utils.py 88.32% <0.00%> (+0.17%) ⬆️

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 75ec6c9...8692264. Read the comment docs.

@patrickvonplaten patrickvonplaten merged commit 296252c into huggingface:master Mar 30, 2020
@patrickvonplaten patrickvonplaten deleted the add_better_explanation_to_t5_docstring branch March 30, 2020 12:26
Labels for computing the sequence classification/regression loss.
Indices should be in :obj:`[0, ..., config.vocab_size - 1]`.
Indices should be in :obj:`[-100, 0, ..., config.vocab_size - 1]`.
If :obj:`config.num_labels > 1` a classification loss is computed (Cross-Entropy).
Copy link
Member

Choose a reason for hiding this comment

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

Should we keep this num_labels mention in the docstring?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, T5 is completely independent from num_labels -> should delete this statement.

Comment on lines +905 to +906
All labels set to ``-100`` are ignored (masked), the loss is only
computed for labels in ``[0, ..., config.vocab_size]``
Copy link
Member

Choose a reason for hiding this comment

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

Great!

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.

3 participants