onnx_light.onnx.onnx_pb#
Compatibility shim for onnx.onnx_pb.
Re-exports all protobuf message types from the top-level onnx_light.onnx
package so that from onnx_light.onnx.onnx_pb import ModelProto works.
- class onnx_light.onnx.onnx_pb.AffineLayoutProto(*args, **kwargs)#
Describes the built-in affine (linear) quantization layout of an EncodedValueProto. The branch is deliberately closed: other affine forms use a structured layout instead of extending this message.
- CopyFrom(self, arg: onnx_light.onnx_py._onnxpyprotoop.AffineLayoutProto, /) None#
Copies one instance into this one.
- HasField(self, field_name: str) bool#
Checks if a field is set, following the protobuf HasField API.
- ParseFromFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Parses a binary file to fill this instance.
- ParseFromString(self, data: bytes, options: object | None = None) None#
- ParseFromString(self, data: str, options: object | None = None) None
Overloaded function.
ParseFromString(self, data: bytes, options: object | None = None) -> None
Parses a sequence of bytes to fill this instance.
ParseFromString(self, data: str, options: object | None = None) -> None
Parses a string to fill this instance.
- SerializeSize(self, options: object | None = None) onnx_light.onnx_py._onnxpyprotoop.SerializeSizeResult#
Returns the size once serialized without serializing.
- SerializeToFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Serializes this instance into a file. If
external_data_sizeis not empty, big weights are stored in this (depending onoptions.raw_data_threshold). When writing to two files, temporary external-data metadata is cleared so the in-memory model stays unchanged.
- SerializeToFileDescriptor(self, fd: int, options: object | None = None) None#
Serializes this instance into an open file descriptor without closing it.
- SerializeToOStream(self, output: object) None#
Alias for SerializeToOstream (capital S) for protobuf API compatibility. Serializes this instance to a Python file-like object that has a write() method.
- SerializeToOstream(self, output: object) None#
Serializes this instance to a Python file-like object that has a write() method.
- SerializeToString(self, options: object | None = None) bytes#
Serializes this instance into a sequence of bytes.
- add_scale(self) onnx_light.onnx_py._onnxpyprotoop.TensorProto#
Sets an empty value.
- add_zero_point(self) onnx_light.onnx_py._onnxpyprotoop.TensorProto#
Sets an empty value.
- property axis#
Omitting axis selects per-tensor quantization; setting it selects per-axis parameters.
- property block_size#
Blocked quantization along axis. It is valid only together with axis.
- property scale#
Scalar or parameter tensor with a floating element type. This field MUST be present for a valid affine layout.
- property signed_storage#
0 is unsigned and 1 is signed. The code width is inferred from the logical shape and payload size and must identify exactly one supported width.
- Type:
Signedness of stored integer codes when storage_type is absent
- property storage_type#
Element type of the stored codes. It MUST be one of INT8, UINT8, INT4, UINT4, INT2 or UINT2 and the payload holds only row-major codes packed like TensorProto.raw_data. Exactly one of storage_type and signed_storage MUST be present. When storage_type is absent, signed_storage determines signedness and the code width is inferred from the logical element count and payload byte length; the payload MUST identify exactly one of the supported 2-bit, 4-bit or 8-bit widths. N is the product of the concrete dimensions in EncodedValueProto.logical_type.tensor_type.shape. B is either EncodedValueProto.raw_data.size() for an inline payload or the numeric ‘length’ entry in EncodedValueProto.external_data when data_location is EXTERNAL. Two-bit storage matches when B == ceil(N / 4) == N / 4 + (N % 4 != 0), 4-bit storage matches when B == ceil(N / 2) == N / 2 + N % 2, and 8-bit storage matches when B == N. Exactly one equality MUST hold; signed_storage then selects the signed INT2, INT4 or INT8 type when equal to 1, and the corresponding unsigned type otherwise.
- property zero_point#
Optional zero point with element type storage_type. It defaults to zero.
- class onnx_light.onnx.onnx_pb.EncodedValueProto(*args, **kwargs)#
One value container with an optional logical tensor type and shape, a layout choice and an owned or external payload with a known byte extent. Payload byte length and the resolved element size determine the record count; no physical shape or redundant count is serialized.
- CopyFrom(self, arg: onnx_light.onnx_py._onnxpyprotoop.EncodedValueProto, /) None#
Copies one instance into this one.
- HasField(self, field_name: str) bool#
Checks if a field is set, following the protobuf HasField API.
- ParseFromFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Parses a binary file to fill this instance.
- ParseFromString(self, data: bytes, options: object | None = None) None#
- ParseFromString(self, data: str, options: object | None = None) None
Overloaded function.
ParseFromString(self, data: bytes, options: object | None = None) -> None
Parses a sequence of bytes to fill this instance.
ParseFromString(self, data: str, options: object | None = None) -> None
Parses a string to fill this instance.
- SerializeSize(self, options: object | None = None) onnx_light.onnx_py._onnxpyprotoop.SerializeSizeResult#
Returns the size once serialized without serializing.
- SerializeToFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Serializes this instance into a file. If
external_data_sizeis not empty, big weights are stored in this (depending onoptions.raw_data_threshold). When writing to two files, temporary external-data metadata is cleared so the in-memory model stays unchanged.
- SerializeToFileDescriptor(self, fd: int, options: object | None = None) None#
Serializes this instance into an open file descriptor without closing it.
- SerializeToOStream(self, output: object) None#
Alias for SerializeToOstream (capital S) for protobuf API compatibility. Serializes this instance to a Python file-like object that has a write() method.
- SerializeToOstream(self, output: object) None#
Serializes this instance to a Python file-like object that has a write() method.
- SerializeToString(self, options: object | None = None) bytes#
Serializes this instance into a sequence of bytes.
- add_affine(self) onnx_light.onnx_py._onnxpyprotoop.AffineLayoutProto#
Sets an empty value.
- add_logical_type(self) onnx_light.onnx_py._onnxpyprotoop.TypeProto#
Sets an empty value.
- add_struct_type(self) onnx_light.onnx_py._onnxpyprotoop.StructTypeProto#
Sets an empty value.
- property affine#
Built-in affine layout.
- property data_location#
DEFAULT reads raw_data, EXTERNAL reads the external payload.
- property doc_string#
A human-readable documentation for this value. Markdown is allowed.
- property external_data#
External payload description. data_location == EXTERNAL requires a ‘location’ entry and an explicit ‘length’; ‘offset’ is optional.
- property logical_type#
Decoded type and shape when the value denotes a tensor. It is required, with concrete dimensions, for the affine branch.
- property name#
Name of the value; graph-scoped and unique across all initializers.
- property parameter_ref#
Model-level shared numerical quantization parameter set.
- property raw_data#
Inline payload holding a flat sequence of encoded records. It is mutually exclusive with external_data, and an empty inline payload represents zero records.
- property struct_type#
an exact type_ref or a concrete inline declaration eligible for byte encoding.
- Type:
Structured layout
- class onnx_light.onnx.onnx_pb.PagedCacheBlockProto(*args, **kwargs)#
One immutable KV page with a contiguous logical token range.
- CopyFrom(self, arg: onnx_light.onnx_py._onnxpyprotoop.PagedCacheBlockProto, /) None#
Copies one instance into this one.
- HasField(self, field_name: str) bool#
Checks if a field is set, following the protobuf HasField API.
- ParseFromFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Parses a binary file to fill this instance.
- ParseFromString(self, data: bytes, options: object | None = None) None#
- ParseFromString(self, data: str, options: object | None = None) None
Overloaded function.
ParseFromString(self, data: bytes, options: object | None = None) -> None
Parses a sequence of bytes to fill this instance.
ParseFromString(self, data: str, options: object | None = None) -> None
Parses a string to fill this instance.
- SerializeSize(self, options: object | None = None) onnx_light.onnx_py._onnxpyprotoop.SerializeSizeResult#
Returns the size once serialized without serializing.
- SerializeToFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Serializes this instance into a file. If
external_data_sizeis not empty, big weights are stored in this (depending onoptions.raw_data_threshold). When writing to two files, temporary external-data metadata is cleared so the in-memory model stays unchanged.
- SerializeToFileDescriptor(self, fd: int, options: object | None = None) None#
Serializes this instance into an open file descriptor without closing it.
- SerializeToOStream(self, output: object) None#
Alias for SerializeToOstream (capital S) for protobuf API compatibility. Serializes this instance to a Python file-like object that has a write() method.
- SerializeToOstream(self, output: object) None#
Serializes this instance to a Python file-like object that has a write() method.
- SerializeToString(self, options: object | None = None) bytes#
Serializes this instance into a sequence of bytes.
- add_encoded_key(self) onnx_light.onnx_py._onnxpyprotoop.EncodedValueProto#
Sets an empty value.
- add_encoded_value(self) onnx_light.onnx_py._onnxpyprotoop.EncodedValueProto#
Sets an empty value.
- add_key(self) onnx_light.onnx_py._onnxpyprotoop.TensorProto#
Sets an empty value.
- add_value(self) onnx_light.onnx_py._onnxpyprotoop.TensorProto#
Sets an empty value.
- property encoded_key#
Inline encoded key tensor.
- property encoded_value#
Inline encoded value tensor.
- property key#
Inline dense key tensor.
- property length#
Number of valid tokens, positive and no greater than capacity.
- property start#
Logical offset of the first token.
- property value#
Inline dense value tensor.
- class onnx_light.onnx.onnx_pb.PagedCacheProto(*args, **kwargs)#
A serializable KV cache. Pages have contiguous token ranges and independently dense or encoded FLOAT [batch,heads,capacity,width] key/value payloads. Model-local type and quantization parameter references are resolved against the containing model.
- CopyFrom(self, arg: onnx_light.onnx_py._onnxpyprotoop.PagedCacheProto, /) None#
Copies one instance into this one.
- HasField(self, field_name: str) bool#
Checks if a field is set, following the protobuf HasField API.
- ParseFromFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Parses a binary file to fill this instance.
- ParseFromString(self, data: bytes, options: object | None = None) None#
- ParseFromString(self, data: str, options: object | None = None) None
Overloaded function.
ParseFromString(self, data: bytes, options: object | None = None) -> None
Parses a sequence of bytes to fill this instance.
ParseFromString(self, data: str, options: object | None = None) -> None
Parses a string to fill this instance.
- SerializeSize(self, options: object | None = None) onnx_light.onnx_py._onnxpyprotoop.SerializeSizeResult#
Returns the size once serialized without serializing.
- SerializeToFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Serializes this instance into a file. If
external_data_sizeis not empty, big weights are stored in this (depending onoptions.raw_data_threshold). When writing to two files, temporary external-data metadata is cleared so the in-memory model stays unchanged.
- SerializeToFileDescriptor(self, fd: int, options: object | None = None) None#
Serializes this instance into an open file descriptor without closing it.
- SerializeToOStream(self, output: object) None#
Alias for SerializeToOstream (capital S) for protobuf API compatibility. Serializes this instance to a Python file-like object that has a write() method.
- SerializeToOstream(self, output: object) None#
Serializes this instance to a Python file-like object that has a write() method.
- SerializeToString(self, options: object | None = None) bytes#
Serializes this instance into a sequence of bytes.
- property blocks#
Ordered immutable KV pages.
- property doc_string#
Human-readable documentation.
- property name#
Graph-scoped initializer name, unique across initializer categories.
- class onnx_light.onnx.onnx_pb.PersistentBindingProto(*args, **kwargs)#
Declares a whole-output to whole-input persistent binding.
- CopyFrom(self, arg: onnx_light.onnx_py._onnxpyprotoop.PersistentBindingProto, /) None#
Copies one instance into this one.
- ParseFromFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Parses a binary file to fill this instance.
- ParseFromString(self, data: bytes, options: object | None = None) None#
- ParseFromString(self, data: str, options: object | None = None) None
Overloaded function.
ParseFromString(self, data: bytes, options: object | None = None) -> None
Parses a sequence of bytes to fill this instance.
ParseFromString(self, data: str, options: object | None = None) -> None
Parses a string to fill this instance.
- SerializeSize(self, options: object | None = None) onnx_light.onnx_py._onnxpyprotoop.SerializeSizeResult#
Returns the size once serialized without serializing.
- SerializeToFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Serializes this instance into a file. If
external_data_sizeis not empty, big weights are stored in this (depending onoptions.raw_data_threshold). When writing to two files, temporary external-data metadata is cleared so the in-memory model stays unchanged.
- SerializeToFileDescriptor(self, fd: int, options: object | None = None) None#
Serializes this instance into an open file descriptor without closing it.
- SerializeToOStream(self, output: object) None#
Alias for SerializeToOstream (capital S) for protobuf API compatibility. Serializes this instance to a Python file-like object that has a write() method.
- SerializeToOstream(self, output: object) None#
Serializes this instance to a Python file-like object that has a write() method.
- SerializeToString(self, options: object | None = None) bytes#
Serializes this instance into a sequence of bytes.
- property input_name#
Names the whole destination graph input, literally.
- property output_name#
Names the whole source graph output, literally.
- class onnx_light.onnx.onnx_pb.StructTypeProto(*args, **kwargs)#
Describes a struct’s fields and types: a concrete declaration selects array, bit_packing or structure, and each field selects either a value type or a tensor constant. A fixed physical size is an eligibility condition for byte encoding, not a requirement on every struct.
- class Array(*args, **kwargs)#
A tight repetition of a single element type.
- CopyFrom(self, arg: onnx_light.onnx_py._onnxpyprotoop.StructTypeProto.Array, /) None#
Copies one instance into this one.
- HasField(self, field_name: str) bool#
Checks if a field is set, following the protobuf HasField API.
- ParseFromFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Parses a binary file to fill this instance.
- ParseFromString(self, data: bytes, options: object | None = None) None#
- ParseFromString(self, data: str, options: object | None = None) None
Overloaded function.
ParseFromString(self, data: bytes, options: object | None = None) -> None
Parses a sequence of bytes to fill this instance.
ParseFromString(self, data: str, options: object | None = None) -> None
Parses a string to fill this instance.
- SerializeSize(self, options: object | None = None) onnx_light.onnx_py._onnxpyprotoop.SerializeSizeResult#
Returns the size once serialized without serializing.
- SerializeToFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Serializes this instance into a file. If
external_data_sizeis not empty, big weights are stored in this (depending onoptions.raw_data_threshold). When writing to two files, temporary external-data metadata is cleared so the in-memory model stays unchanged.
- SerializeToFileDescriptor(self, fd: int, options: object | None = None) None#
Serializes this instance into an open file descriptor without closing it.
- SerializeToOStream(self, output: object) None#
Alias for SerializeToOstream (capital S) for protobuf API compatibility. Serializes this instance to a Python file-like object that has a write() method.
- SerializeToOstream(self, output: object) None#
Serializes this instance to a Python file-like object that has a write() method.
- SerializeToString(self, options: object | None = None) bytes#
Serializes this instance into a sequence of bytes.
- add_element_type(self) onnx_light.onnx_py._onnxpyprotoop.TypeProto#
Sets an empty value.
- property dimension#
Number of elements, an explicit concrete count.
- property element_type#
Type of one element.
- class BitPacking(*args, **kwargs)#
A tight repetition of a group of named bit fields.
- class Component(*args, **kwargs)#
One named bit field inside a bit-packing group.
- CopyFrom(self, arg: onnx_light.onnx_py._onnxpyprotoop.StructTypeProto.BitPacking.Component, /) None#
Copies one instance into this one.
- HasField(self, field_name: str) bool#
Checks if a field is set, following the protobuf HasField API.
- ParseFromFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Parses a binary file to fill this instance.
- ParseFromString(self, data: bytes, options: object | None = None) None#
- ParseFromString(self, data: str, options: object | None = None) None
Overloaded function.
ParseFromString(self, data: bytes, options: object | None = None) -> None
Parses a sequence of bytes to fill this instance.
ParseFromString(self, data: str, options: object | None = None) -> None
Parses a string to fill this instance.
- SerializeSize(self, options: object | None = None) onnx_light.onnx_py._onnxpyprotoop.SerializeSizeResult#
Returns the size once serialized without serializing.
- SerializeToFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Serializes this instance into a file. If
external_data_sizeis not empty, big weights are stored in this (depending onoptions.raw_data_threshold). When writing to two files, temporary external-data metadata is cleared so the in-memory model stays unchanged.
- SerializeToFileDescriptor(self, fd: int, options: object | None = None) None#
Serializes this instance into an open file descriptor without closing it.
- SerializeToOStream(self, output: object) None#
Alias for SerializeToOstream (capital S) for protobuf API compatibility. Serializes this instance to a Python file-like object that has a write() method.
- SerializeToOstream(self, output: object) None#
Serializes this instance to a Python file-like object that has a write() method.
- SerializeToString(self, options: object | None = None) bytes#
Serializes this instance into a sequence of bytes.
- property bit_width#
Width of the component in bits, strictly positive.
- property name#
Component name, unique within the enclosing bit packing.
- CopyFrom(self, arg: onnx_light.onnx_py._onnxpyprotoop.StructTypeProto.BitPacking, /) None#
Copies one instance into this one.
- HasField(self, field_name: str) bool#
Checks if a field is set, following the protobuf HasField API.
- ParseFromFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Parses a binary file to fill this instance.
- ParseFromString(self, data: bytes, options: object | None = None) None#
- ParseFromString(self, data: str, options: object | None = None) None
Overloaded function.
ParseFromString(self, data: bytes, options: object | None = None) -> None
Parses a sequence of bytes to fill this instance.
ParseFromString(self, data: str, options: object | None = None) -> None
Parses a string to fill this instance.
- SerializeSize(self, options: object | None = None) onnx_light.onnx_py._onnxpyprotoop.SerializeSizeResult#
Returns the size once serialized without serializing.
- SerializeToFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Serializes this instance into a file. If
external_data_sizeis not empty, big weights are stored in this (depending onoptions.raw_data_threshold). When writing to two files, temporary external-data metadata is cleared so the in-memory model stays unchanged.
- SerializeToFileDescriptor(self, fd: int, options: object | None = None) None#
Serializes this instance into an open file descriptor without closing it.
- SerializeToOStream(self, output: object) None#
Alias for SerializeToOstream (capital S) for protobuf API compatibility. Serializes this instance to a Python file-like object that has a write() method.
- SerializeToOstream(self, output: object) None#
Serializes this instance to a Python file-like object that has a write() method.
- SerializeToString(self, options: object | None = None) bytes#
Serializes this instance into a sequence of bytes.
- property component#
Components of one group, laid out from the least significant bit.
- property dimension#
Number of repeated groups, an explicit concrete count.
- CopyFrom(self, arg: onnx_light.onnx_py._onnxpyprotoop.StructTypeProto, /) None#
Copies one instance into this one.
- HasField(self, field_name: str) bool#
Checks if a field is set, following the protobuf HasField API.
- ParseFromFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Parses a binary file to fill this instance.
- ParseFromString(self, data: bytes, options: object | None = None) None#
- ParseFromString(self, data: str, options: object | None = None) None
Overloaded function.
ParseFromString(self, data: bytes, options: object | None = None) -> None
Parses a sequence of bytes to fill this instance.
ParseFromString(self, data: str, options: object | None = None) -> None
Parses a string to fill this instance.
- SerializeSize(self, options: object | None = None) onnx_light.onnx_py._onnxpyprotoop.SerializeSizeResult#
Returns the size once serialized without serializing.
- SerializeToFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Serializes this instance into a file. If
external_data_sizeis not empty, big weights are stored in this (depending onoptions.raw_data_threshold). When writing to two files, temporary external-data metadata is cleared so the in-memory model stays unchanged.
- SerializeToFileDescriptor(self, fd: int, options: object | None = None) None#
Serializes this instance into an open file descriptor without closing it.
- SerializeToOStream(self, output: object) None#
Alias for SerializeToOstream (capital S) for protobuf API compatibility. Serializes this instance to a Python file-like object that has a write() method.
- SerializeToOstream(self, output: object) None#
Serializes this instance to a Python file-like object that has a write() method.
- SerializeToString(self, options: object | None = None) bytes#
Serializes this instance into a sequence of bytes.
- class Structure(*args, **kwargs)#
An ordered list of named fields.
- CopyFrom(self, arg: onnx_light.onnx_py._onnxpyprotoop.StructTypeProto.Structure, /) None#
Copies one instance into this one.
- class Field(*args, **kwargs)#
One named field holding either a value type or a shared format constant.
- CopyFrom(self, arg: onnx_light.onnx_py._onnxpyprotoop.StructTypeProto.Structure.Field, /) None#
Copies one instance into this one.
- HasField(self, field_name: str) bool#
Checks if a field is set, following the protobuf HasField API.
- ParseFromFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Parses a binary file to fill this instance.
- ParseFromString(self, data: bytes, options: object | None = None) None#
- ParseFromString(self, data: str, options: object | None = None) None
Overloaded function.
ParseFromString(self, data: bytes, options: object | None = None) -> None
Parses a sequence of bytes to fill this instance.
ParseFromString(self, data: str, options: object | None = None) -> None
Parses a string to fill this instance.
- SerializeSize(self, options: object | None = None) onnx_light.onnx_py._onnxpyprotoop.SerializeSizeResult#
Returns the size once serialized without serializing.
- SerializeToFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Serializes this instance into a file. If
external_data_sizeis not empty, big weights are stored in this (depending onoptions.raw_data_threshold). When writing to two files, temporary external-data metadata is cleared so the in-memory model stays unchanged.
- SerializeToFileDescriptor(self, fd: int, options: object | None = None) None#
Serializes this instance into an open file descriptor without closing it.
- SerializeToOStream(self, output: object) None#
Alias for SerializeToOstream (capital S) for protobuf API compatibility. Serializes this instance to a Python file-like object that has a write() method.
- SerializeToOstream(self, output: object) None#
Serializes this instance to a Python file-like object that has a write() method.
- SerializeToString(self, options: object | None = None) bytes#
Serializes this instance into a sequence of bytes.
- add_constant(self) onnx_light.onnx_py._onnxpyprotoop.TensorProto#
Sets an empty value.
- add_type(self) onnx_light.onnx_py._onnxpyprotoop.TypeProto#
Sets an empty value.
- property constant#
The actual shared format constant, not a graph input. It must have concrete dimensions and matching data, and contributes zero payload bytes.
- property doc_string#
A human-readable documentation for this field. Markdown is allowed.
- property name#
Field name, unique within the enclosing structure.
- property type#
Type of the field value. It follows the existing TypeProto validation rules for tensors, nested structs, sequences, maps and optional values.
- HasField(self, field_name: str) bool#
Checks if a field is set, following the protobuf HasField API.
- ParseFromFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Parses a binary file to fill this instance.
- ParseFromString(self, data: bytes, options: object | None = None) None#
- ParseFromString(self, data: str, options: object | None = None) None
Overloaded function.
ParseFromString(self, data: bytes, options: object | None = None) -> None
Parses a sequence of bytes to fill this instance.
ParseFromString(self, data: str, options: object | None = None) -> None
Parses a string to fill this instance.
- SerializeSize(self, options: object | None = None) onnx_light.onnx_py._onnxpyprotoop.SerializeSizeResult#
Returns the size once serialized without serializing.
- SerializeToFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Serializes this instance into a file. If
external_data_sizeis not empty, big weights are stored in this (depending onoptions.raw_data_threshold). When writing to two files, temporary external-data metadata is cleared so the in-memory model stays unchanged.
- SerializeToFileDescriptor(self, fd: int, options: object | None = None) None#
Serializes this instance into an open file descriptor without closing it.
- SerializeToOStream(self, output: object) None#
Alias for SerializeToOstream (capital S) for protobuf API compatibility. Serializes this instance to a Python file-like object that has a write() method.
- SerializeToOstream(self, output: object) None#
Serializes this instance to a Python file-like object that has a write() method.
- SerializeToString(self, options: object | None = None) bytes#
Serializes this instance into a sequence of bytes.
- property field#
Fields in declaration order.
- add_array(self) onnx_light.onnx_py._onnxpyprotoop.StructTypeProto.Array#
Sets an empty value.
- add_bit_packing(self) onnx_light.onnx_py._onnxpyprotoop.StructTypeProto.BitPacking#
Sets an empty value.
- add_decoder(self) onnx_light.onnx_py._onnxpyprotoop.FunctionProto#
Sets an empty value.
- add_encoder(self) onnx_light.onnx_py._onnxpyprotoop.FunctionProto#
Sets an empty value.
- add_structure(self) onnx_light.onnx_py._onnxpyprotoop.StructTypeProto.Structure#
Sets an empty value.
- property array#
Array declaration.
- property bit_packing#
Bit-packing declaration.
- property decoder#
Optional decoder. Only the concrete root’s codec is invoked; a nested type_ref contributes layout and constants but not its own decoder or encoder.
- property doc_string#
A human-readable documentation for this type. Markdown is allowed.
- property encoder#
Optional encoder, mirroring decoder.
- property metadata_props#
Named metadata values; keys should be distinct.
- property name#
A human-readable name for this declaration.
- property structure#
Structure declaration.
- property type_id#
Nonzero, model-scoped stable format identity. Each ID has exactly one declaration in ModelProto.struct_types; an inline declaration has no type_id and cannot be referenced.
- property type_ref#
declaration fields, metadata, codecs and another kind must be absent.
- Type:
Reference to a declaration in ModelProto.struct_types. A type_ref carries only the referenced ID