Fixing requirements for TF LM models and use correct model mappings (#14372)
* Fixing requirements for TF LM models and use correct model mappings * make style
This commit is contained in:
@@ -43,8 +43,8 @@ import transformers
|
||||
from transformers import (
|
||||
CONFIG_MAPPING,
|
||||
CONFIG_NAME,
|
||||
MODEL_FOR_CAUSAL_LM_MAPPING,
|
||||
TF2_WEIGHTS_NAME,
|
||||
TF_MODEL_FOR_CAUSAL_LM_MAPPING,
|
||||
AutoConfig,
|
||||
AutoTokenizer,
|
||||
HfArgumentParser,
|
||||
@@ -57,8 +57,8 @@ from transformers.utils.versions import require_version
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")
|
||||
MODEL_CONFIG_CLASSES = list(MODEL_FOR_CAUSAL_LM_MAPPING.keys())
|
||||
require_version("datasets>=1.8.0", "To fix: pip install -r examples/tensorflow/language-modeling/requirements.txt")
|
||||
MODEL_CONFIG_CLASSES = list(TF_MODEL_FOR_CAUSAL_LM_MAPPING.keys())
|
||||
MODEL_TYPES = tuple(conf.model_type for conf in MODEL_CONFIG_CLASSES)
|
||||
# endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user