chore: import upstream snapshot with attribution
cffconvert / validate (push) Has been skipped
License Check / license-check (push) Failing after 2s

This commit is contained in:
wehub-resource-sync
2026-07-13 12:14:16 +08:00
commit 8a852e4b4e
36502 changed files with 9277225 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
# Description:
# Contains Keras protobufs
load("@rules_python//python:proto.bzl", "py_proto_library")
load("//tensorflow/core/platform:build_config.bzl", "tf_proto_library")
package(
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
default_visibility = [
"//tensorflow/python/keras:__subpackages__",
],
licenses = ["notice"],
)
tf_proto_library(
name = "projector_config_proto",
srcs = ["projector_config.proto"],
)
tf_proto_library(
name = "saved_metadata_proto",
srcs = ["saved_metadata.proto"],
protodeps = [":versions_proto"],
)
tf_proto_library(
name = "versions_proto",
srcs = ["versions.proto"],
)
# copybara:uncomment_begin(google-only)
# py_proto_library(
# name = "saved_metadata_proto_py_pb2",
# deps = [":saved_metadata_proto"],
# )
#
# py_proto_library(
# name = "projector_config_proto_py_pb2",
# deps = [":projector_config_proto"],
# )
#
# py_proto_library(
# name = "versions_proto_py_pb2",
# deps = [":versions_proto"],
# )
# copybara:uncomment_end
@@ -0,0 +1,50 @@
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
// This file is a copy of the TensorBoard ProjectorConfig proto.
// Keep this file in sync with the source proto definition at
// https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/projector/projector_config.proto
syntax = "proto3";
package third_party.tensorflow.python.keras.protobuf;
message SpriteMetadata {
string image_path = 1;
// [width, height] of a single image in the sprite.
repeated uint32 single_image_dim = 2;
}
message EmbeddingInfo {
string tensor_name = 1;
string metadata_path = 2;
string bookmarks_path = 3;
// Shape of the 2D tensor [N x D]. If missing, it will be inferred from the
// model checkpoint.
repeated uint32 tensor_shape = 4;
SpriteMetadata sprite = 5;
// Path to the TSV file holding the tensor values. If missing, the tensor
// is assumed to be stored in the model checkpoint.
string tensor_path = 6;
}
message ProjectorConfig {
// Path to the checkpoint file. Use either this or model_checkpoint_dir.
string model_checkpoint_path = 1;
repeated EmbeddingInfo embeddings = 2;
// Path to the checkpoint directory. The directory will be scanned for the
// latest checkpoint file.
string model_checkpoint_dir = 3;
}
@@ -0,0 +1,51 @@
// Copyright 2026 The TensorFlow Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ==============================================================================
// Protobuf containing the metadata for each Keras object saved in a SavedModel.
syntax = "proto3";
package third_party.tensorflow.python.keras.protobuf;
import "tensorflow/python/keras/protobuf/versions.proto";
message SavedMetadata {
// Nodes represent trackable objects in the SavedModel. The data for every
// Keras object is stored.
repeated SavedObject nodes = 1;
}
// Metadata of an individual Keras object.
message SavedObject {
reserved 1; // For previous VersionDef info.
// Index of the node in the SavedModel SavedObjectGraph.
int32 node_id = 2;
// String path from root (e.g. "root.child_layer")
string node_path = 3;
// Identifier to determine loading function.
// Must be one of:
// _tf_keras_input_layer, _tf_keras_layer, _tf_keras_metric,
// _tf_keras_model, _tf_keras_network, _tf_keras_rnn_layer,
// _tf_keras_sequential
string identifier = 4;
// Metadata containing a JSON-serialized object with the non-TensorFlow
// attributes for this Keras object.
string metadata = 5;
// Version defined by the code serializing this Keras object.
third_party.tensorflow.python.keras.protobuf.VersionDef version = 6;
}
@@ -0,0 +1,48 @@
// Copyright 2026 The TensorFlow Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ==============================================================================
syntax = "proto3";
package third_party.tensorflow.python.keras.protobuf;
// This file is a copy of the TensorFlow Versions proto.
// Keep this file in sync with the source proto definition at
// https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/framework/versions.proto
// Version information for a piece of serialized data
//
// There are different types of versions for each type of data
// (GraphDef, etc.), but they all have the same common shape
// described here.
//
// Each consumer has "consumer" and "min_producer" versions (specified
// elsewhere). A consumer is allowed to consume this data if
//
// producer >= min_producer
// consumer >= min_consumer
// consumer not in bad_consumers
//
// LINT.IfChange
message VersionDef {
// The version of the code that produced this data.
int32 producer = 1;
// Any consumer below this version is not allowed to consume this data.
int32 min_consumer = 2;
// Specific consumer versions which are disallowed (e.g. due to bugs).
repeated int32 bad_consumers = 3;
}
// LINT.ThenChange(//tensorflow/core/framework/versions.proto)