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

Function current_context

axlearn/common/module.py:601–604  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

599
600 Raises:
601 ValueError: if the current thread id does not match the global context stack thread id.
602 """
603 current_thread_id = threading.get_ident()
604 if _global_context_stack.thread_id == current_thread_id:
605 raise ValueError("install_context_stack should only be called on a different thread")
606 _global_context_stack.thread_id = current_thread_id
607 _global_context_stack.stack = stack

Callers 15

forwardMethod · 0.90
forwardMethod · 0.90
forwardMethod · 0.90
bind_layerFunction · 0.90
update_fnFunction · 0.90
scale_fnFunction · 0.90
_log_per_layer_statsFunction · 0.90
_weight_decay_scalesFunction · 0.90
_update2Function · 0.90
test_context_stackMethod · 0.90

Calls

no outgoing calls

Tested by 7

bind_layerFunction · 0.72
test_context_stackMethod · 0.72
fnMethod · 0.72
test_functionalMethod · 0.72
fnMethod · 0.72