"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "26a9443dae41737e665910fbb617173e17a0cd18"
Unverified Commit b4919cb5 authored by Bearnardd's avatar Bearnardd Committed by GitHub
Browse files

Auto tokenizer registration (#23965)

add check loop over extra content
parent b1430190
......@@ -645,6 +645,10 @@ def config_class_to_model_type(config):
for key, cls in CONFIG_MAPPING_NAMES.items():
if cls == config:
return key
# if key not found check in extra content
for key, cls in CONFIG_MAPPING._extra_content.items():
if cls.__name__ == config:
return key
return None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment