Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey, looks like the library is currently broken when installed with the latest versions of everything.
Since the latest release in transformers (more specifically, since this commit huggingface/transformers@d4c2cb4) the config maps (pretrained_config_archive_map) do not exist.
This means that bertscore right now fails when used with the latest version of transformers, which it will pull when installing locally.
e.g, when running the unittests:
ERROR: bert_score (unittest.loader._FailedTest)
ImportError: Failed to import test module: bert_score
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/lib/python3.6/unittest/loader.py", line 462, in _find_test_path
package = self._get_module_from_name(name)
File "/home/ec2-user/anaconda3/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
import(name)
File "/home/ec2-user/useful_code/bert_score/bert_score/init.py", line 2, in
from .utils import *
File "/home/ec2-user/useful_code/bert_score/bert_score/utils.py", line 32, in
+ list(SCIBERT_URL_DICT.keys())
AttributeError: type object 'BertConfig' has no attribute 'pretrained_config_archive_map'
Solution
SInce this attribute is no longer being used anywhere, the easy fix here is to remove the map from utils.py as everything is migrated to AutoTokenizer anyway.