1syntax = "proto3"; 2 3package tensorflow.data.experimental; 4 5import "tensorflow/core/framework/tensor.proto"; 6import "tensorflow/core/framework/tensor_shape.proto"; 7import "tensorflow/core/framework/types.proto"; 8 9// Each SnapshotRecord represents one batch of pre-processed input data. A batch 10// consists of a list of tensors that we encode as TensorProtos. This message 11// doesn't store the structure of the batch. 12message SnapshotRecord { 13 repeated .tensorflow.TensorProto tensor = 1; 14} 15 16// This stores the metadata information present in each snapshot record. 17message SnapshotMetadataRecord { 18 // Stores the fingerprint of the graph that describes the dataset that is 19 // snapshotted. 20 string graph_hash = 1; 21 // Run ID that this snapshot corresponds to. 22 string run_id = 2; 23 // Time when we started creating this snapshot. 24 int64 creation_timestamp = 3; 25 // Version of the snapshot data file format. 26 int64 version = 4; 27 // A list of tensor dtype corresponding to each element of the snapshot. 28 repeated .tensorflow.DataType dtype = 5; 29 // The number of elements in the snapshot. 30 int64 num_elements = 6; 31 32 bool finalized = 1000; 33} 34 35// Metadata for a single tensor in the Snapshot Record. 36message TensorMetadata { 37 .tensorflow.TensorShapeProto tensor_shape = 2; 38 // Number of uncompressed bytes used to store the tensor representation. 39 int64 tensor_size_bytes = 3; 40} 41 42// Metadata for all the tensors in a Snapshot Record. 43message SnapshotTensorMetadata { 44 repeated TensorMetadata tensor_metadata = 1; 45} 46