[Bugfix] Deprecate registration of custom configs to huggingface (#9083)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user