openfl.protocols.utils.bytes_and_metadata_to_model_proto#
- openfl.protocols.utils.bytes_and_metadata_to_model_proto(bytes_dict, model_id, model_version, is_delta, metadata_dict)[source]#
Convert bytes and metadata to model protobuf.
- Parameters:
bytes_dict – A dictionary where the keys are tensor names and the values are the corresponding tensor data in bytes.
model_id – The ID of the model.
model_version – The version of the model.
is_delta – A flag indicating whether the model is a delta model.
metadata_dict – A dictionary where the keys are tensor names and the values are the corresponding tensor metadata.
- Returns:
The protobuf of the model.
- Return type:
model_proto