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

Fix ordering of args for BERT w.r.t. transformers torchscript changes #59

Merged
merged 1 commit into from
Nov 14, 2019

Conversation

chiragjn
Copy link
Contributor

@chiragjn chiragjn commented Nov 12, 2019

huggingface/transformers 2.x changed the order of args for some Torchscript changes

https:/huggingface/transformers/blob/8aba81a0b64bbf7a2dcd13eaceb543c5f38fd82f/transformers/modeling_bert.py#L855-L856

huggingface/transformers#1195

Given nlpaug is calling BERT forward without named arguments, it seems like the current code has segment_inputs and mask_inputs swapped. Adding names to args should fix it

@codecov-io
Copy link

codecov-io commented Nov 12, 2019

Codecov Report

Merging #59 into master will decrease coverage by 0.08%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #59      +/-   ##
==========================================
- Coverage   47.31%   47.23%   -0.09%     
==========================================
  Files         106      106              
  Lines        3711     3711              
==========================================
- Hits         1756     1753       -3     
- Misses       1955     1958       +3
Impacted Files Coverage Δ
nlpaug/model/lang_models/bert.py 31.25% <0%> (ø) ⬆️
nlpaug/augmenter/word/random.py 85.45% <0%> (-1.82%) ⬇️
nlpaug/augmenter/char/random.py 89.7% <0%> (-1.48%) ⬇️

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 e6f14a7...50e7cf5. Read the comment docs.

@makcedward makcedward merged commit 5a26a99 into makcedward:master Nov 14, 2019
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