MCPcopy Index your code
hub / github.com/pytorch/pytorch / local_init

Method local_init

caffe2/python/net_builder.py:434–443  ·  view source on GitHub ↗

Similar to `task_init`, but executes at TaskGroup's startup instead, before any task of the group starts executing. This will run only once on each node, before initialization of any task, so it can be used e.g. to initialize blobs shared across tasks.

(self)

Source from the content-addressed store, hash-verified

432 return setup
433
434 def local_init(self):
435 """
436 Similar to `task_init`, but executes at TaskGroup's startup instead,
437 before any task of the group starts executing. This will run only
438 once on each node, before initialization of any task, so it can be
439 used e.g. to initialize blobs shared across tasks.
440 """
441 setup = _SetupBuilder(_SetupBuilder.INIT)
442 self.net().add_attribute(TaskGroup.LOCAL_SETUP, setup)
443 return setup
444
445 def local_exit(self, name=None):
446 """

Callers

nothing calls this directly

Calls 3

netMethod · 0.95
_SetupBuilderClass · 0.85
add_attributeMethod · 0.80

Tested by

no test coverage detected