Skip to content

Commit

Permalink
Removing model_types from utils.py (#58)
Browse files Browse the repository at this point in the history
Co-authored-by: Ioannis Douratsos <ioannisd@amazon.com>
  • Loading branch information
dougian and Ioannis Douratsos authored Jun 5, 2020
1 parent 3a974d4 commit f89412e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 11 deletions.
1 change: 0 additions & 1 deletion bert_score/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
__version__ = "0.3.3"
from .utils import *
from .score import *
from .scorer import *
1 change: 0 additions & 1 deletion bert_score/score.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
get_idf_dict,
bert_cos_score_idf,
get_bert_embedding,
model_types,
lang2model,
model2layers,
get_hash,
Expand Down
1 change: 0 additions & 1 deletion bert_score/scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
get_idf_dict,
bert_cos_score_idf,
get_bert_embedding,
model_types,
lang2model,
model2layers,
get_hash,
Expand Down
9 changes: 1 addition & 8 deletions bert_score/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from . import __version__
from transformers import __version__ as trans_version

__all__ = ["model_types"]
__all__ = []

SCIBERT_URL_DICT = {
"scibert-scivocab-uncased": "https://s3-us-west-2.amazonaws.com/ai2-s2-research/scibert/pytorch_models/scibert_scivocab_uncased.tar", # recommend by the SciBERT authors
Expand All @@ -24,13 +24,6 @@
"scibert-basevocab-cased": "https://s3-us-west-2.amazonaws.com/ai2-s2-research/scibert/pytorch_models/scibert_basevocab_cased.tar",
}

model_types = (
list(BertConfig.pretrained_config_archive_map.keys())
+ list(XLNetConfig.pretrained_config_archive_map.keys())
+ list(RobertaConfig.pretrained_config_archive_map.keys())
+ list(XLMConfig.pretrained_config_archive_map.keys())
+ list(SCIBERT_URL_DICT.keys())
)

lang2model = defaultdict(lambda: "bert-base-multilingual-cased")
lang2model.update(
Expand Down

0 comments on commit f89412e

Please sign in to comment.