viam.proto.app.mlinference ========================== .. py:module:: viam.proto.app.mlinference .. autoapi-nested-parse:: @generated by Viam. Do not edit manually! Classes ------- .. autoapisummary:: viam.proto.app.mlinference.MLInferenceServiceBase viam.proto.app.mlinference.MLInferenceServiceStub viam.proto.app.mlinference.UnimplementedMLInferenceServiceBase viam.proto.app.mlinference.GetInferenceRequest viam.proto.app.mlinference.GetInferenceResponse Package Contents ---------------- .. py:class:: MLInferenceServiceBase Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: GetInference(stream: grpclib.server.Stream[app.mlinference.v1.ml_inference_pb2.GetInferenceRequest, app.mlinference.v1.ml_inference_pb2.GetInferenceResponse]) -> None :abstractmethod: :async: .. py:method:: __mapping__() -> Dict[str, grpclib.const.Handler] .. py:class:: MLInferenceServiceStub(channel: grpclib.client.Channel) .. py:attribute:: GetInference .. py:class:: UnimplementedMLInferenceServiceBase Bases: :py:obj:`MLInferenceServiceBase` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: GetInference(stream: grpclib.server.Stream[app.mlinference.v1.ml_inference_pb2.GetInferenceRequest, app.mlinference.v1.ml_inference_pb2.GetInferenceResponse]) -> None :async: .. py:class:: GetInferenceRequest(*, registry_item_id: str = ..., registry_item_version: str = ..., binary_id: viam.gen.app.data.v1.data_pb2.BinaryID | None = ..., binary_data_id: str = ..., organization_id: str = ...) Bases: :py:obj:`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. .. py:attribute:: registry_item_id :type: 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. .. py:attribute:: registry_item_version :type: str .. py:attribute:: binary_data_id :type: str .. py:attribute:: organization_id :type: str .. py:property:: binary_id :type: viam.gen.app.data.v1.data_pb2.BinaryID .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetInferenceResponse(*, output_tensors: viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensors | None = ..., annotations: viam.gen.app.data.v1.data_pb2.Annotations | None = ...) Bases: :py:obj:`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. .. py:property:: output_tensors :type: viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensors .. py:property:: annotations :type: viam.gen.app.data.v1.data_pb2.Annotations .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message.