Skip to content

Conversation

@patrickvonplaten
Copy link
Contributor

Fixed bug with TF 2.0 repetition_penalty when doing generation add make early_stopping an argument to the function generate().

@codecov-io
Copy link

codecov-io commented Mar 9, 2020

Codecov Report

Merging #3190 into master will increase coverage by 0.1%.
The diff coverage is 42.85%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #3190     +/-   ##
=========================================
+ Coverage   77.98%   78.09%   +0.1%     
=========================================
  Files          98       98             
  Lines       16641    16645      +4     
=========================================
+ Hits        12978    12999     +21     
+ Misses       3663     3646     -17
Impacted Files Coverage Δ
src/transformers/configuration_utils.py 96.74% <100%> (+0.02%) ⬆️
src/transformers/modeling_tf_utils.py 91.38% <33.33%> (+3.59%) ⬆️
src/transformers/modeling_utils.py 94.56% <0%> (-0.16%) ⬇️

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 b29fed7...847d370. Read the comment docs.

@patrickvonplaten
Copy link
Contributor Author

Good to merge for me.

Copy link
Member

@thomwolf thomwolf left a comment

Choose a reason for hiding this comment

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

Small typo bug otherwise it's good to go

# Parameters for sequence generation
self.max_length = kwargs.pop("max_length", 20)
self.do_sample = kwargs.pop("do_sample", False)
self.do_sample = kwargs.pop("early_stopping", False)
Copy link
Member

Choose a reason for hiding this comment

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

LHS and RHS are not the same

@patrickvonplaten
Copy link
Contributor Author

Small typo bug otherwise it's good to go

Thanks for spotting!

@patrickvonplaten patrickvonplaten merged commit 49debe6 into huggingface:master Mar 9, 2020
@patrickvonplaten patrickvonplaten deleted the fix_repetition_penalty_in_tf_generate branch March 9, 2020 15:34
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