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

AttributeError: 'RobertaTokenizerFast' object has no attribute 'max_len' #163

Open
NiloufarShoeibi opened this issue Jun 21, 2023 · 1 comment

Comments

@NiloufarShoeibi
Copy link

Hi everyone!
I am facing this error while calculating the BERT_score.

image

Can anyone help with this issue?

@felixgwu
Copy link
Collaborator

Hi @NiloufarShoeibi ,

Please update your bert-score to the latest version (0.3.13). We check the version of transformers and use tokenizer.model_max_length instead if it's >= 4.0.0. Please check the code here.
https://github.com/Tiiiger/bert_score/blob/master/bert_score/utils.py#L195-L217

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

2 participants