mstar.utils.ipc_format#
Classes
|
|
|
|
|
|
|
A worker reporting requests it can no longer serve. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- class mstar.utils.ipc_format.AbortRequest(request_id: str)[source]#
Bases:
MessageBody- Parameters:
request_id (str)
- class mstar.utils.ipc_format.ConductorMessage(message_type: mstar.utils.ipc_format.ConductorMessageType, body: mstar.utils.ipc_format.MessageBody)[source]#
Bases:
object- Parameters:
message_type (ConductorMessageType)
body (MessageBody)
- body: MessageBody#
- message_type: ConductorMessageType#
- class mstar.utils.ipc_format.ConductorMessageType(*values)[source]#
Bases:
Enum- ABORT_REQUEST = 'abort_request'#
- FAIL_REQUESTS = 'fail_requests'#
- NEW_REQUEST = 'new_request'#
- SETUP_DONE = 'setup_done'#
- WORKER_GRAPHS_DONE = 'worker_graphs_done'#
- class mstar.utils.ipc_format.FailRequests(errors)[source]#
Bases:
MessageBodyA worker reporting requests it can no longer serve.
errorsmaps request_id -> message. It’s a dict rather than a (rids, message) pair because per-rid stages (prepare_inputs, postprocess) attribute a distinct error to each request, and one step can fail several of them for different reasons.
- class mstar.utils.ipc_format.InputSignals(request_id: str, inputs: list[mstar.graph.base.GraphEdge], request_info: mstar.conductor.request_info.CurrentForwardPassInfo, partition_name: str = 'default', producer_done: set = <factory>)[source]#
Bases:
MessageBody- Parameters:
- request_info: CurrentForwardPassInfo#
- class mstar.utils.ipc_format.MessageSource(*values)[source]#
Bases:
IntEnum- CONDUCTOR = 0#
- SELF = 2#
- TP_RANK_0 = 1#
- class mstar.utils.ipc_format.NewRequest(request_id: str, partition_worker_graph_ids: list[str], worker_graph_to_workers: dict[str, list[str]], initial_inputs: list[mstar.graph.base.GraphEdge], request_info: mstar.conductor.request_info.CurrentForwardPassInfo)[source]#
Bases:
MessageBody- Parameters:
- request_info: CurrentForwardPassInfo#
- class mstar.utils.ipc_format.NewRequestConductor(request_id: str, initial_signals: dict[str, list[mstar.graph.base.TensorPointerInfo]], initial_input_modalities: list[str], initial_output_modalities: list[str], input_metadata: dict[str, list[dict]], model_kwargs: dict)[source]#
Bases:
MessageBody- Parameters:
- initial_signals: dict[str, list[TensorPointerInfo]]#
- class mstar.utils.ipc_format.RemoveRequest(request_id: str, source: int = <MessageSource.CONDUCTOR: 0>)[source]#
Bases:
MessageBody
- class mstar.utils.ipc_format.ScheduleTPNode(node_name: str, graph_walk: str, request_ids: list[str])[source]#
Bases:
MessageBody
- class mstar.utils.ipc_format.SetupDone(worker_id: str)[source]#
Bases:
MessageBody- Parameters:
worker_id (str)
- class mstar.utils.ipc_format.Status(*values)[source]#
Bases:
Enum- DONE = 'done'#
- IN_PROGRESS = 'in_progress'#
- READY = 'ready'#
- WAITING = 'waiting'#
- class mstar.utils.ipc_format.StopLoops(request_id: str, loop_names: set[str], partition_name: str, loop_stop_times: dict[str, mstar.graph.loop_indices.NestedLoopIndices] = <factory>)[source]#
Bases:
MessageBody- Parameters:
- loop_stop_times: dict[str, NestedLoopIndices]#
- class mstar.utils.ipc_format.TensorReceived(request_id: str, successful_tensors: dict[str, int], failed_tensor_ids: list[str])[source]#
Bases:
MessageBody
- class mstar.utils.ipc_format.UnpersistTensors(request_id: str, uuid_to_ref_count: dict[str, int])[source]#
Bases:
MessageBody
- class mstar.utils.ipc_format.WorkerGraphsDone(request_id: str, worker_graph_ids: list[str], is_first_tp_rank: bool, persist_signals: dict[str, list[mstar.graph.base.TensorPointerInfo]] = <factory>, new_token_counts: dict[str, int] = <factory>, output_signal_names: int = 0, resource_publish_info: dict[str, mstar.engine.resources.base.PublishedInfo] = <factory>, partition_name: str = 'default', partition_done: bool = False, stream_tokens_consumed: dict[str, int] = <factory>, output_loop_indices: dict[str, mstar.graph.loop_indices.NestedLoopIndices] = <factory>, graph_timings: dict[tuple[str, str], mstar.profile.format.GraphTiming] = <factory>, rx_info: list[mstar.profile.format.RxInfo] = <factory>, tx_info: list[mstar.profile.format.TxInfo] = <factory>)[source]#
Bases:
MessageBody- Parameters:
request_id (str)
is_first_tp_rank (bool)
persist_signals (dict[str, list[TensorPointerInfo]])
output_signal_names (int)
resource_publish_info (dict[str, PublishedInfo])
partition_name (str)
partition_done (bool)
output_loop_indices (dict[str, NestedLoopIndices])
rx_info (list[RxInfo])
tx_info (list[TxInfo])
- output_loop_indices: dict[str, NestedLoopIndices]#
- persist_signals: dict[str, list[TensorPointerInfo]]#
- resource_publish_info: dict[str, PublishedInfo]#
- class mstar.utils.ipc_format.WorkerMessage(message_type: mstar.utils.ipc_format.WorkerMessageType, body: mstar.utils.ipc_format.MessageBody)[source]#
Bases:
object- Parameters:
message_type (WorkerMessageType)
body (MessageBody)
- body: MessageBody#
- message_type: WorkerMessageType#