MCPcopy Create free account
hub / github.com/agentscope-ai/Trinity-RFT / init_process_group

Method init_process_group

trinity/common/models/model.py:814–833  ·  view source on GitHub ↗

Initialize the process group for model weight synchronization.

(
        self,
        master_address: str,
        master_port: int,
        rank_offset: int,
        world_size: int,
        group_name: str,
        timeout: int = 1200,
    )

Source from the content-addressed store, hash-verified

812 return data["server_load"]
813
814 async def init_process_group(
815 self,
816 master_address: str,
817 master_port: int,
818 rank_offset: int,
819 world_size: int,
820 group_name: str,
821 timeout: int = 1200,
822 ):
823 """Initialize the process group for model weight synchronization."""
824
825 await self.model.init_process_group.remote(
826 master_address=master_address,
827 master_port=master_port,
828 rank_offset=rank_offset,
829 world_size=world_size,
830 group_name=group_name,
831 backend="nccl",
832 timeout=timeout,
833 )
834
835 async def teardown_process_group(self):
836 """Destroy the process group for model weight synchronization."""

Callers 7

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
setup_dlcFunction · 0.45

Calls 1

remoteMethod · 0.80

Tested by

no test coverage detected