[Bugfix] Deprecate registration of custom configs to huggingface (#9083)

This commit is contained in:
Chen Zhang
2024-10-05 21:56:40 +08:00
committed by GitHub
parent 15986f598c
commit cfadb9c687
3 changed files with 2 additions and 16 deletions
-8
View File
@@ -1,4 +1,3 @@
import contextlib
import enum
import json
from pathlib import Path
@@ -61,13 +60,6 @@ _CONFIG_REGISTRY: Dict[str, Type[PretrainedConfig]] = {
**_CONFIG_REGISTRY_OVERRIDE_HF
}
for name, cls in _CONFIG_REGISTRY.items():
with contextlib.suppress(ValueError):
if name in _CONFIG_REGISTRY_OVERRIDE_HF:
AutoConfig.register(name, cls, exist_ok=True)
else:
AutoConfig.register(name, cls)
class ConfigFormat(str, enum.Enum):
AUTO = "auto"