viam.gen.service.mlmodel.v1.mlmodel_pb2
@generated by mypy-protobuf. Do not edit manually! isort:skip_file
Attributes
the value of the arrays/tensor is the label index |
|
the position of the tensor value in the axis is the label index |
|
Classes
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
|
Abstract base class for protocol messages. |
Module Contents
- viam.gen.service.mlmodel.v1.mlmodel_pb2.DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.LabelType
Bases:
_LabelType
- viam.gen.service.mlmodel.v1.mlmodel_pb2.LABEL_TYPE_TENSOR_VALUE: LabelType
the value of the arrays/tensor is the label index
- viam.gen.service.mlmodel.v1.mlmodel_pb2.LABEL_TYPE_TENSOR_AXIS: LabelType
the position of the tensor value in the axis is the label index
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___LabelType
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.InferRequest(*, name: str = ..., input_tensors: global___FlatTensors | None = ..., extra: google.protobuf.struct_pb2.Struct | 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.
- name: str
name of the model service
- property input_tensors: global___FlatTensors
the input data is provided as set of named flat tensors
- property extra: google.protobuf.struct_pb2.Struct
Additional arguments to the method
- HasField(field_name: Literal['extra', b'extra', 'input_tensors', b'input_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.
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___InferRequest
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.InferResponse(*, output_tensors: global___FlatTensors | 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: global___FlatTensors
the output data is provided as a set of named flat tensors
- HasField(field_name: Literal['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.
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___InferResponse
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.MetadataRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | 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.
- name: str
name of the model service
- property extra: google.protobuf.struct_pb2.Struct
Additional arguments to the method
- HasField(field_name: Literal['extra', b'extra']) 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.
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___MetadataRequest
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.MetadataResponse(*, metadata: global___Metadata | 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 metadata: global___Metadata
this is the metadata associated with the ML model
- HasField(field_name: Literal['metadata', b'metadata']) 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.
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___MetadataResponse
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.Metadata(*, name: str = ..., type: str = ..., description: str = ..., input_info: collections.abc.Iterable[global___TensorInfo] | None = ..., output_info: collections.abc.Iterable[global___TensorInfo] | 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.
- name: str
name of the model
- type: str
type of model e.g. object_detector, text_classifier
- description: str
description of the model
- property input_info: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___TensorInfo]
the necessary input arrays/tensors for an inference, order matters
- property output_info: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___TensorInfo]
the output arrays/tensors of the model, order matters
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___Metadata
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.TensorInfo(*, name: str = ..., description: str = ..., data_type: str = ..., shape: collections.abc.Iterable[int] | None = ..., associated_files: collections.abc.Iterable[global___File] | None = ..., extra: google.protobuf.struct_pb2.Struct | 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.
- name: str
name of the data in the array/tensor
- description: str
description of the data in the array/tensor
- data_type: str
data type of the array/tensor, e.g. float32, float64, uint8
- property shape: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
shape of the array/tensor (-1 for unknown)
- property associated_files: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___File]
files associated with the array/tensor, like for category labels
- property extra: google.protobuf.struct_pb2.Struct
anything else you want to say
- HasField(field_name: Literal['extra', b'extra']) 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.
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___TensorInfo
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.File(*, name: str = ..., description: str = ..., label_type: global___LabelType = ...)
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.
- name: str
name of the file, with file extension
- description: str
description of what the file contains
- label_type: global___LabelType
How to associate the arrays/tensors to the labels in the file
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___File
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensorDataInt8(*, data: bytes = ...)
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.
- data: bytes
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___FlatTensorDataInt8
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensorDataUInt8(*, data: bytes = ...)
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.
- data: bytes
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___FlatTensorDataUInt8
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensorDataInt16(*, data: collections.abc.Iterable[int] | 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 data: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
packs two 16-bit numbers per entry - explicitly little-endian so big-endian producers/consumers must compensate
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___FlatTensorDataInt16
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensorDataUInt16(*, data: collections.abc.Iterable[int] | 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 data: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
packs two 16-bit numbers per entry - explicitly little-endian so big-endian producers/consumers must compensate
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___FlatTensorDataUInt16
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensorDataInt32(*, data: collections.abc.Iterable[int] | 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 data: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___FlatTensorDataInt32
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensorDataUInt32(*, data: collections.abc.Iterable[int] | 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 data: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___FlatTensorDataUInt32
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensorDataInt64(*, data: collections.abc.Iterable[int] | 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 data: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___FlatTensorDataInt64
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensorDataUInt64(*, data: collections.abc.Iterable[int] | 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 data: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___FlatTensorDataUInt64
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensorDataFloat(*, data: collections.abc.Iterable[float] | 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 data: google.protobuf.internal.containers.RepeatedScalarFieldContainer[float]
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___FlatTensorDataFloat
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensorDataDouble(*, data: collections.abc.Iterable[float] | 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 data: google.protobuf.internal.containers.RepeatedScalarFieldContainer[float]
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___FlatTensorDataDouble
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensor(*, shape: collections.abc.Iterable[int] | None = ..., int8_tensor: global___FlatTensorDataInt8 | None = ..., uint8_tensor: global___FlatTensorDataUInt8 | None = ..., int16_tensor: global___FlatTensorDataInt16 | None = ..., uint16_tensor: global___FlatTensorDataUInt16 | None = ..., int32_tensor: global___FlatTensorDataInt32 | None = ..., uint32_tensor: global___FlatTensorDataUInt32 | None = ..., int64_tensor: global___FlatTensorDataInt64 | None = ..., uint64_tensor: global___FlatTensorDataUInt64 | None = ..., float_tensor: global___FlatTensorDataFloat | None = ..., double_tensor: global___FlatTensorDataDouble | 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 shape: google.protobuf.internal.containers.RepeatedScalarFieldContainer[int]
the shape of the provided tensor as a list of integer extents
- property int8_tensor: global___FlatTensorDataInt8
- property uint8_tensor: global___FlatTensorDataUInt8
- property int16_tensor: global___FlatTensorDataInt16
- property uint16_tensor: global___FlatTensorDataUInt16
- property int32_tensor: global___FlatTensorDataInt32
- property uint32_tensor: global___FlatTensorDataUInt32
- property int64_tensor: global___FlatTensorDataInt64
- property uint64_tensor: global___FlatTensorDataUInt64
- property float_tensor: global___FlatTensorDataFloat
- property double_tensor: global___FlatTensorDataDouble
- HasField(field_name: Literal['double_tensor', b'double_tensor', 'float_tensor', b'float_tensor', 'int16_tensor', b'int16_tensor', 'int32_tensor', b'int32_tensor', 'int64_tensor', b'int64_tensor', 'int8_tensor', b'int8_tensor', 'tensor', b'tensor', 'uint16_tensor', b'uint16_tensor', 'uint32_tensor', b'uint32_tensor', 'uint64_tensor', b'uint64_tensor', 'uint8_tensor', b'uint8_tensor']) 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.
- WhichOneof(oneof_group: Literal['tensor', b'tensor']) Literal['int8_tensor', 'uint8_tensor', 'int16_tensor', 'uint16_tensor', 'int32_tensor', 'uint32_tensor', 'int64_tensor', 'uint64_tensor', 'float_tensor', 'double_tensor'] | None
Returns the name of the field that is set inside a oneof group.
If no field is set, returns None.
- Parameters:
oneof_group (str) – the name of the oneof group to check.
- Returns:
The name of the group that is set, or None.
- Return type:
str or None
- Raises:
ValueError – no group with the given name exists
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___FlatTensor
- class viam.gen.service.mlmodel.v1.mlmodel_pb2.FlatTensors(*, tensors: collections.abc.Mapping[str, global___FlatTensor] | 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.
- class TensorsEntry(*, key: str = ..., value: global___FlatTensor | 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.
- key: str
- property value: global___FlatTensor
- HasField(field_name: Literal['value', b'value']) 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.
- property tensors: google.protobuf.internal.containers.MessageMap[str, global___FlatTensor]
A name-indexed collection of flat tensor objects
- viam.gen.service.mlmodel.v1.mlmodel_pb2.global___FlatTensors