mstar.api_server.request_types#

Classes

APIServerMessage(message_type[, body])

Envelope for messages received by the API server.

DataWorkerProfile(request_id[, ...])

Profiling reported by the API-server data worker at preprocess finish: the timestamp at which the request was handed to the conductor and the per-modality sizes of the raw inputs.

PreprocessInput(request_id, text, ...)

RequestComplete(request_id, final_outputs, ...)

Signals that a request has finished processing.

ResultChunk(request_id, modality, data[, ...])

One chunk of generated output for a request.

ResultTensors(request_id, modality, ...)

class mstar.api_server.request_types.APIServerMessage(message_type, body=None)[source]#

Bases: object

Envelope for messages received by the API server.

Parameters:
body: ResultTensors | RequestComplete | None = None#
message_type: str#
class mstar.api_server.request_types.DataWorkerProfile(request_id, preprocess_finish_time=None, inputs=<factory>)[source]#

Bases: object

Profiling reported by the API-server data worker at preprocess finish: the timestamp at which the request was handed to the conductor and the per-modality sizes of the raw inputs. (The data worker’s tx/rx are read directly from its tensor manager at request completion, not via this.)

Parameters:
  • request_id (str)

  • preprocess_finish_time (float | None)

  • inputs (list[InputInfo])

inputs: list[InputInfo]#
preprocess_finish_time: float | None = None#
request_id: str#
class mstar.api_server.request_types.PreprocessInput(request_id: str, text: str | None, file_paths: dict[str, list[str]] | None, input_modalities: list[str], output_modalities: list[str], model_kwargs: dict)[source]#

Bases: object

Parameters:
file_paths: dict[str, list[str]] | None#
input_modalities: list[str]#
model_kwargs: dict#
output_modalities: list[str]#
request_id: str#
text: str | None#
class mstar.api_server.request_types.RequestComplete(request_id, final_outputs, conductor_ingest_time, conductor_finish_time, graph_timings=<factory>, rx_info=<factory>, tx_info=<factory>)[source]#

Bases: object

Signals that a request has finished processing.

Parameters:
conductor_finish_time: float#
conductor_ingest_time: float#
final_outputs: dict[str, NestedLoopIndices]#
graph_timings: dict[tuple[str, str], GraphTiming]#
request_id: str#
rx_info: list[RxInfo]#
tx_info: list[TxInfo]#
class mstar.api_server.request_types.ResultChunk(request_id, modality, data, metadata=<factory>)[source]#

Bases: object

One chunk of generated output for a request.

Parameters:
data: bytes#
metadata: dict#
modality: str#
request_id: str#
class mstar.api_server.request_types.ResultTensors(request_id: str, modality: str, graph_edge: mstar.graph.base.GraphEdge, loop_indices: mstar.graph.loop_indices.NestedLoopIndices, metadata: dict = <factory>)[source]#

Bases: object

Parameters:
graph_edge: GraphEdge#
loop_indices: NestedLoopIndices#
metadata: dict#
modality: str#
request_id: str#