MCPcopy
hub / github.com/InternLM/InternLM / is_initialized

Method is_initialized

internlm/core/context/parallel_context.py:475–479  ·  view source on GitHub ↗

Returns a boolean value indicating whether `parallel_mode` is initialized in the current system.

(self, parallel_mode: ParallelMode)

Source from the content-addressed store, hash-verified

473 self._register_dist(*parallel_setting)
474
475 def is_initialized(self, parallel_mode: ParallelMode):
476 """Returns a boolean value indicating whether `parallel_mode` is initialized
477 in the current system.
478 """
479 return parallel_mode in self._groups
480
481 def destroy(self):
482 """Destroys the current distributed parallel environment."""

Callers 15

is_using_dpMethod · 0.95
is_using_tpMethod · 0.95
is_using_ppMethod · 0.95
is_first_rankMethod · 0.95
is_last_rankMethod · 0.95
set_seedMethod · 0.95
sync_model_paramFunction · 0.80
is_no_pp_or_last_stageFunction · 0.80
__init__Method · 0.80
get_tensor_shapeFunction · 0.80
__init__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected