MCPcopy
hub / github.com/InternLM/InternLM / is_using_pp

Method is_using_pp

internlm/core/context/parallel_context.py:252–256  ·  view source on GitHub ↗

Returns a boolean value indicating whether the current device is initilized with ParallelMode.PIPELINE and its world_size is greater than 1.

(self)

Source from the content-addressed store, hash-verified

250 return self.is_initialized(ParallelMode.TENSOR) and self.get_world_size(ParallelMode.TENSOR) > 1
251
252 def is_using_pp(self):
253 """Returns a boolean value indicating whether the current device is initilized with
254 ParallelMode.PIPELINE and its world_size is greater than 1.
255 """
256 return self.is_initialized(ParallelMode.PIPELINE) and self.get_world_size(ParallelMode.PIPELINE) > 1
257
258 def is_using_sequence(self):
259 """Returns a boolean value indicating whether the current device is initilized with

Callers 5

mainFunction · 0.80
evaluate_on_val_dlsFunction · 0.80
initialize_trainerFunction · 0.80

Calls 2

is_initializedMethod · 0.95
get_world_sizeMethod · 0.95

Tested by

no test coverage detected