viam.proto.app.mlinference

@generated by Viam. Do not edit manually!

Classes

MLInferenceServiceBase

Helper class that provides a standard way to create an ABC using

MLInferenceServiceStub

UnimplementedMLInferenceServiceBase

Helper class that provides a standard way to create an ABC using

GetInferenceRequest

Abstract base class for protocol messages.

GetInferenceResponse

Abstract base class for protocol messages.

Package Contents

class viam.proto.app.mlinference.MLInferenceServiceBase[source]

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

abstract GetInference(stream: grpclib.server.Stream[app.mlinference.v1.ml_inference_pb2.GetInferenceRequest, app.mlinference.v1.ml_inference_pb2.GetInferenceResponse]) None[source]
Async:

__mapping__() Dict[str, grpclib.const.Handler][source]
class viam.proto.app.mlinference.MLInferenceServiceStub(channel: grpclib.client.Channel)[source]
GetInference
class viam.proto.app.mlinference.UnimplementedMLInferenceServiceBase[source]

Bases: MLInferenceServiceBase

Helper class that provides a standard way to create an ABC using inheritance.

async GetInference(stream: grpclib.server.Stream[app.mlinference.v1.ml_inference_pb2.GetInferenceRequest, app.mlinference.v1.ml_inference_pb2.GetInferenceResponse]) None[source]
class viam.proto.app.mlinference.GetInferenceRequest(*, registry_item_id: str = ..., registry_item_version: str = ..., binary_id: viam.gen.app.data.v1.data_pb2.BinaryID | None = ..., organization_id: str = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

registry_item_id: str

The model framework and model type are inferred from the ML model registry item; For valid model types (classification, detections) we will return the formatted labels or annotations from the associated inference outputs.

registry_item_version: str
organization_id: str
property binary_id: viam.gen.app.data.v1.data_pb2.BinaryID
HasField(field_name: Literal['binary_id', b'binary_id']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.proto.app.mlinference.GetInferenceResponse(*, output_tensors: viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensors | None = ..., annotations: viam.gen.app.data.v1.data_pb2.Annotations | None = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

property output_tensors: viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensors
property annotations: viam.gen.app.data.v1.data_pb2.Annotations
HasField(field_name: Literal['annotations', b'annotations', 'output_tensors', b'output_tensors']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.