the-algorithm/navi/navi/proto/tensorflow_serving/apis/input.proto
twitter-team ef4c5eb65e Twitter Recommendation Algorithm
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
2023-03-31 17:36:31 -05:00

83 lines
2.0 KiB
Protocol Buffer

// Input used in serving APIs. Based on the tensorflow.Example family of
// feature representations.
syntax = "proto3";
option cc_enable_arenas = true;
import "tensorflow/core/example/example.proto";
package tensorflow.serving;
// Specifies one or more fully independent input Examples.
// See examples at:
// https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/example/example.proto
message ExampleList {
repeated tensorflow.Example examples = 1;
}
// Specifies one or more independent input Examples, with a common context
// Example.
//
// The common use case for context is to cleanly and optimally specify some
// features that are common across multiple examples.
//
// See example below with a search query as the context and multiple restaurants
// to perform some inference on.
//
// context: {
// features: {
// feature: {
// key : "query"
// value: {
// bytes_list: {
// value: [ "pizza" ]
// }
// }
// }
// }
// }
// examples: {
// features: {
// feature: {
// key : "cuisine"
// value: {
// bytes_list: {
// value: [ "Pizzeria" ]
// }
// }
// }
// }
// }
// examples: {
// features: {
// feature: {
// key : "cuisine"
// value: {
// bytes_list: {
// value: [ "Taqueria" ]
// }
// }
// }
// }
// }
//
// Implementations of ExampleListWithContext merge the context Example into each
// of the Examples. Note that feature keys must not be duplicated between the
// Examples and context Example, or the behavior is undefined.
//
// See also:
// tensorflow/core/example/example.proto
// https://developers.google.com/protocol-buffers/docs/proto3#maps
message ExampleListWithContext {
repeated tensorflow.Example examples = 1;
tensorflow.Example context = 2;
}
message Input {
oneof kind {
ExampleList example_list = 1 [lazy = true];
ExampleListWithContext example_list_with_context = 2 [lazy = true];
}
}