Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/huggingface/transformers
/ register
Method
register
src/transformers/utils/generic.py:1099–1100 ·
view source on GitHub ↗
(cls, key: str, value: Callable)
Source
from the content-addressed store, hash-verified
1097
1098
@classmethod
1099
def
register(cls, key: str, value: Callable):
1100
cls._global_mapping.update({key: value})
1101
1102
def
valid_keys(self) -> list[str]:
1103
return
list(self.keys())
Callers
15
register_network_debug_plugin
Function · 0.45
load_and_register_attn_kernel
Function · 0.45
test_registered_experts_implementation_is_valid
Method · 0.45
test_new_processor_registration
Method · 0.45
test_from_pretrained_dynamic_processor_conflict
Method · 0.45
test_from_pretrained_dynamic_processor_with_extra_attributes
Method · 0.45
test_dynamic_processor_with_specific_dynamic_subcomponents
Method · 0.45
test_from_pretrained_dynamic_model_local
Method · 0.45
test_new_model_registration
Method · 0.45
test_from_pretrained_dynamic_model_conflict
Method · 0.45
test_new_tokenizer_registration
Method · 0.45
test_new_tokenizer_fast_registration
Method · 0.45
Calls
1
update
Method · 0.45
Tested by
15
test_registered_experts_implementation_is_valid
Method · 0.36
test_new_processor_registration
Method · 0.36
test_from_pretrained_dynamic_processor_conflict
Method · 0.36
test_from_pretrained_dynamic_processor_with_extra_attributes
Method · 0.36
test_dynamic_processor_with_specific_dynamic_subcomponents
Method · 0.36
test_from_pretrained_dynamic_model_local
Method · 0.36
test_new_model_registration
Method · 0.36
test_from_pretrained_dynamic_model_conflict
Method · 0.36
test_new_tokenizer_registration
Method · 0.36
test_new_tokenizer_fast_registration
Method · 0.36
test_from_pretrained_dynamic_tokenizer_conflict
Method · 0.36
test_new_video_processor_registration
Method · 0.36