mstar.streaming.topology#

Classes

Connection(from_partition, to_partition, ...)

Defines a streaming connection between two partitions.

PartitionTopology(partitions[, connections])

Declares how a model's computation is split into async partitions.

StreamingGraphEdge(next_node, name[, ...])

A graph edge that carries streaming data between partitions.

class mstar.streaming.topology.Connection(from_partition, to_partition, edge_name, chunk_policy_factory)[source]#

Bases: object

Defines a streaming connection between two partitions.

Parameters:
chunk_policy_factory: Callable[[], ChunkPolicy]#
edge_name: str#
from_partition: str#
to_partition: str#
class mstar.streaming.topology.PartitionTopology(partitions, connections=<factory>)[source]#

Bases: object

Declares how a model’s computation is split into async partitions.

Each partition has its own set of graph walks. Connections define streaming data flow between partitions via StreamBuffers.

Parameters:
connections: list[Connection]#
partitions: list[str]#
class mstar.streaming.topology.StreamingGraphEdge(next_node, name, tensor_info=<factory>, persist=False, conductor_new_token=False, is_streaming=False, output_modality='', _persist_for_loop=False, _final_stream_chunk=False, _total_fanin=1, _shard_dim=None, target_partition='')[source]#

Bases: GraphEdge

A graph edge that carries streaming data between partitions.

Routed like a normal GraphEdge (producer is unaware it’s streaming). On the consumer worker, the arriving tensors are buffered in a StreamBuffer and gated by a ChunkPolicy before satisfying the consuming node’s input.

Parameters:
target_partition: str = ''#