Module - utils

Module - utils#

Proto utils.

Functions

bytes_and_metadata_to_model_proto(...)

Convert bytes and metadata to model protobuf.

construct_model_proto(tensor_dict, ...)

Construct model proto from tensor dict.

construct_named_tensor(tensor_key, nparray, ...)

Construct named tensor.

construct_proto(tensor_dict, model_id, ...)

Construct proto.

datastream_to_proto(proto, stream)

Convert the datastream to the protobuf.

deconstruct_model_proto(model_proto, ...[, ...])

Deconstruct model proto.

deconstruct_proto(model_proto, ...)

Deconstruct the protobuf.

dump_proto(model_proto, fpath)

Dump the protobuf to a file.

get_headers(context)

Get headers from context.

load_proto(fpath)

Load the protobuf.

model_proto_to_bytes_and_metadata(model_proto)

Convert the model protobuf to bytes and metadata.

proto_to_datastream(proto[, max_buffer_size])

Convert the protobuf to the datastream for the remote connection.