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

score function failed with the new transformers v4.0.0 #85

Closed
kirzharov opened this issue Dec 4, 2020 · 4 comments
Closed

score function failed with the new transformers v4.0.0 #85

kirzharov opened this issue Dec 4, 2020 · 4 comments

Comments

@kirzharov
Copy link
Contributor

kirzharov commented Dec 4, 2020

What I did:
Try to get scores with score function

Actual result:
Get the error: 'RobertaTokenizerFast' object has no attribute 'max_len'

Expected result:
score function work as before and get results

More details:

  • bert_score version: 0.3.6
  • transformers version: 4.0.0
  • Python version: 3.8

Context:

Previous warning:
The max_len attribute has been deprecated and will be removed in a future version, use model_max_length instead.

@kirzharov
Copy link
Contributor Author

kirzharov commented Dec 4, 2020

Hi guys! I added PR with a hotfix for this issue: #86, and when I created a PR, I saw a similar one: #84 😀

@kirzharov kirzharov changed the title score function failed with the new transformers version score function failed with the new transformers v4.0.0 Dec 4, 2020
kirzharov added a commit to kirzharov/bert_score that referenced this issue Dec 4, 2020
@kirzharov
Copy link
Contributor Author

kirzharov commented Dec 4, 2020

For those who will need to use the bert_score version before this fix (for example: 0.3.6, 0.3.5, .etc):

Just add transformers==3.5.1 to your requirements.txt file or install before installing previous bert_score version with pip install transformers==3.5.1 or just update with pip install -U transformers==3.5.1 (if you have installed transformers or bert_score before)

Link to the comment from similar issue in transformers repo: huggingface/transformers#8739 (comment)

@davebulaval
Copy link

Hi guys! I added PR with a hotfix for this issue: #86, and when I created a PR, I saw a similar one: #84

tks for the help on the fix.

@felixgwu
Copy link
Collaborator

felixgwu commented Dec 5, 2020

This is resolved. Please use the code in our master branch for now. We will update the pypi package soon.

@felixgwu felixgwu closed this as completed Dec 5, 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

No branches or pull requests

3 participants