MCPcopy Create free account
hub / github.com/apple/axlearn / _attr_fields_dict_cache

Function _attr_fields_dict_cache

axlearn/common/config.py:460–469  ·  view source on GitHub ↗

Cache the fields dict for type. Args: type_obj: Type to be cached. Returns: A dictionary of fields for the type.

(type_obj: type)

Source from the content-addressed store, hash-verified

458
459@cache
460def _attr_fields_dict_cache(type_obj: type) -> dict[str, attr.Attribute]:
461 """Cache the fields dict for type.
462
463 Args:
464 type_obj: Type to be cached.
465
466 Returns:
467 A dictionary of fields for the type.
468 """
469 return attr.fields_dict(type_obj)
470
471
472@cache

Callers 8

__init__Method · 0.85
__deepcopy__Method · 0.85
__contains__Method · 0.85
__len__Method · 0.85
__getattr__Method · 0.85
keysMethod · 0.85
process_kvMethod · 0.85
wrapped_setattrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected