Split the scheduler into multiple mixin classes to reduce the file size (#8483)
This commit is contained in:
@@ -2071,6 +2071,9 @@ class PortArgs:
|
||||
|
||||
dist_init_host, dist_init_port = dist_init_addr
|
||||
port_base = int(dist_init_port) + 1
|
||||
detokenizer_port = port_base + 1
|
||||
rpc_port = port_base + 2
|
||||
metrics_ipc_name = port_base + 3
|
||||
if dp_rank is None:
|
||||
# TokenizerManager to DataParallelController
|
||||
scheduler_input_port = port_base + 4
|
||||
@@ -2080,10 +2083,10 @@ class PortArgs:
|
||||
return PortArgs(
|
||||
tokenizer_ipc_name=f"tcp://{dist_init_host}:{port_base}",
|
||||
scheduler_input_ipc_name=f"tcp://{dist_init_host}:{scheduler_input_port}",
|
||||
detokenizer_ipc_name=f"tcp://{dist_init_host}:{port_base + 1}",
|
||||
detokenizer_ipc_name=f"tcp://{dist_init_host}:{detokenizer_port}",
|
||||
nccl_port=nccl_port,
|
||||
rpc_ipc_name=f"tcp://{dist_init_host}:{port_base + 2}",
|
||||
metrics_ipc_name=f"tcp://{dist_init_host}:{port_base + 3}",
|
||||
rpc_ipc_name=f"tcp://{dist_init_host}:{rpc_port}",
|
||||
metrics_ipc_name=f"tcp://{dist_init_host}:{metrics_ipc_name}",
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user