Skip to content

Conversation

@dougian
Copy link
Contributor

@dougian dougian commented Jun 5, 2020

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.

@Tiiiger
Copy link
Owner

Tiiiger commented Jun 5, 2020

Good catch. Looks good to me.

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.

2 participants