Package tensorflow.serving
Class Predict.PredictRequest
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
tensorflow.serving.Predict.PredictRequest
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable,Predict.PredictRequestOrBuilder
- Enclosing class:
Predict
public static final class Predict.PredictRequest
extends com.google.protobuf.GeneratedMessageV3
implements Predict.PredictRequestOrBuilder
PredictRequest specifies which TensorFlow model to run, as well as how inputs are mapped to tensors and how outputs are filtered before returning to user.Protobuf type
tensorflow.serving.PredictRequest- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classPredictRequest specifies which TensorFlow model to run, as well as how inputs are mapped to tensors and how outputs are filtered before returning to user.static final classOptions for PredictRequest.static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsInputs(String key) Input tensors.booleancom.google.protobuf.ByteStringClient identifier to group requests belonging to a specific entity.static Predict.PredictRequeststatic final com.google.protobuf.Descriptors.DescriptorDeprecated.intInput tensors.Input tensors.getInputsOrDefault(String key, TensorProto defaultValue) Input tensors.getInputsOrThrow(String key) Input tensors.Model Specification.Model Specification.getOutputFilter(int index) Output filter.com.google.protobuf.ByteStringgetOutputFilterBytes(int index) Output filter.intOutput filter.com.google.protobuf.ProtocolStringListOutput filter.com.google.protobuf.Parser<Predict.PredictRequest> Options for streaming requests to control how multiple requests/responses are handled within a single stream.Options for streaming requests to control how multiple requests/responses are handled within a single stream.optional .tensorflow.serving.PredictRequest.RequestOptions request_options = 7;optional .tensorflow.serving.PredictRequest.RequestOptions request_options = 7;intbooleanClient identifier to group requests belonging to a specific entity.inthashCode()booleanModel Specification.booleanOptions for streaming requests to control how multiple requests/responses are handled within a single stream.booleanoptional .tensorflow.serving.PredictRequest.RequestOptions request_options = 7;protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) final booleannewBuilder(Predict.PredictRequest prototype) protected Predict.PredictRequest.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static Predict.PredictRequestparseDelimitedFrom(InputStream input) static Predict.PredictRequestparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Predict.PredictRequestparseFrom(byte[] data) static Predict.PredictRequestparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Predict.PredictRequestparseFrom(com.google.protobuf.ByteString data) static Predict.PredictRequestparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Predict.PredictRequestparseFrom(com.google.protobuf.CodedInputStream input) static Predict.PredictRequestparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Predict.PredictRequestparseFrom(InputStream input) static Predict.PredictRequestparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Predict.PredictRequestparseFrom(ByteBuffer data) static Predict.PredictRequestparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Predict.PredictRequest> parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
MODEL_SPEC_FIELD_NUMBER
public static final int MODEL_SPEC_FIELD_NUMBER- See Also:
-
INPUTS_FIELD_NUMBER
public static final int INPUTS_FIELD_NUMBER- See Also:
-
OUTPUT_FILTER_FIELD_NUMBER
public static final int OUTPUT_FILTER_FIELD_NUMBER- See Also:
-
PREDICT_STREAMED_OPTIONS_FIELD_NUMBER
public static final int PREDICT_STREAMED_OPTIONS_FIELD_NUMBER- See Also:
-
CLIENT_ID_FIELD_NUMBER
public static final int CLIENT_ID_FIELD_NUMBER- See Also:
-
REQUEST_OPTIONS_FIELD_NUMBER
public static final int REQUEST_OPTIONS_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
hasModelSpec
public boolean hasModelSpec()Model Specification. If version is not specified, will use the latest (numerical) version.
.tensorflow.serving.ModelSpec model_spec = 1;- Specified by:
hasModelSpecin interfacePredict.PredictRequestOrBuilder- Returns:
- Whether the modelSpec field is set.
-
getModelSpec
Model Specification. If version is not specified, will use the latest (numerical) version.
.tensorflow.serving.ModelSpec model_spec = 1;- Specified by:
getModelSpecin interfacePredict.PredictRequestOrBuilder- Returns:
- The modelSpec.
-
getModelSpecOrBuilder
Model Specification. If version is not specified, will use the latest (numerical) version.
.tensorflow.serving.ModelSpec model_spec = 1;- Specified by:
getModelSpecOrBuilderin interfacePredict.PredictRequestOrBuilder
-
getInputsCount
public int getInputsCount()Description copied from interface:Predict.PredictRequestOrBuilderInput tensors. Names of input tensor are alias names. The mapping from aliases to real input tensor names is stored in the SavedModel export as a prediction SignatureDef under the 'inputs' field.
map<string, .tensorflow.TensorProto> inputs = 2;- Specified by:
getInputsCountin interfacePredict.PredictRequestOrBuilder
-
containsInputs
Input tensors. Names of input tensor are alias names. The mapping from aliases to real input tensor names is stored in the SavedModel export as a prediction SignatureDef under the 'inputs' field.
map<string, .tensorflow.TensorProto> inputs = 2;- Specified by:
containsInputsin interfacePredict.PredictRequestOrBuilder
-
getInputs
Deprecated.UsegetInputsMap()instead.- Specified by:
getInputsin interfacePredict.PredictRequestOrBuilder
-
getInputsMap
Input tensors. Names of input tensor are alias names. The mapping from aliases to real input tensor names is stored in the SavedModel export as a prediction SignatureDef under the 'inputs' field.
map<string, .tensorflow.TensorProto> inputs = 2;- Specified by:
getInputsMapin interfacePredict.PredictRequestOrBuilder
-
getInputsOrDefault
Input tensors. Names of input tensor are alias names. The mapping from aliases to real input tensor names is stored in the SavedModel export as a prediction SignatureDef under the 'inputs' field.
map<string, .tensorflow.TensorProto> inputs = 2;- Specified by:
getInputsOrDefaultin interfacePredict.PredictRequestOrBuilder
-
getInputsOrThrow
Input tensors. Names of input tensor are alias names. The mapping from aliases to real input tensor names is stored in the SavedModel export as a prediction SignatureDef under the 'inputs' field.
map<string, .tensorflow.TensorProto> inputs = 2;- Specified by:
getInputsOrThrowin interfacePredict.PredictRequestOrBuilder
-
getOutputFilterList
public com.google.protobuf.ProtocolStringList getOutputFilterList()Output filter. Names specified are alias names. The mapping from aliases to real output tensor names is stored in the SavedModel export as a prediction SignatureDef under the 'outputs' field. Only tensors specified here will be run/fetched and returned, with the exception that when none is specified, all tensors specified in the named signature will be run/fetched and returned.
repeated string output_filter = 3;- Specified by:
getOutputFilterListin interfacePredict.PredictRequestOrBuilder- Returns:
- A list containing the outputFilter.
-
getOutputFilterCount
public int getOutputFilterCount()Output filter. Names specified are alias names. The mapping from aliases to real output tensor names is stored in the SavedModel export as a prediction SignatureDef under the 'outputs' field. Only tensors specified here will be run/fetched and returned, with the exception that when none is specified, all tensors specified in the named signature will be run/fetched and returned.
repeated string output_filter = 3;- Specified by:
getOutputFilterCountin interfacePredict.PredictRequestOrBuilder- Returns:
- The count of outputFilter.
-
getOutputFilter
Output filter. Names specified are alias names. The mapping from aliases to real output tensor names is stored in the SavedModel export as a prediction SignatureDef under the 'outputs' field. Only tensors specified here will be run/fetched and returned, with the exception that when none is specified, all tensors specified in the named signature will be run/fetched and returned.
repeated string output_filter = 3;- Specified by:
getOutputFilterin interfacePredict.PredictRequestOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The outputFilter at the given index.
-
getOutputFilterBytes
public com.google.protobuf.ByteString getOutputFilterBytes(int index) Output filter. Names specified are alias names. The mapping from aliases to real output tensor names is stored in the SavedModel export as a prediction SignatureDef under the 'outputs' field. Only tensors specified here will be run/fetched and returned, with the exception that when none is specified, all tensors specified in the named signature will be run/fetched and returned.
repeated string output_filter = 3;- Specified by:
getOutputFilterBytesin interfacePredict.PredictRequestOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the outputFilter at the given index.
-
hasPredictStreamedOptions
public boolean hasPredictStreamedOptions()Options for streaming requests to control how multiple requests/responses are handled within a single stream.
.tensorflow.serving.PredictStreamedOptions predict_streamed_options = 5;- Specified by:
hasPredictStreamedOptionsin interfacePredict.PredictRequestOrBuilder- Returns:
- Whether the predictStreamedOptions field is set.
-
getPredictStreamedOptions
Options for streaming requests to control how multiple requests/responses are handled within a single stream.
.tensorflow.serving.PredictStreamedOptions predict_streamed_options = 5;- Specified by:
getPredictStreamedOptionsin interfacePredict.PredictRequestOrBuilder- Returns:
- The predictStreamedOptions.
-
getPredictStreamedOptionsOrBuilder
Options for streaming requests to control how multiple requests/responses are handled within a single stream.
.tensorflow.serving.PredictStreamedOptions predict_streamed_options = 5;- Specified by:
getPredictStreamedOptionsOrBuilderin interfacePredict.PredictRequestOrBuilder
-
hasClientId
public boolean hasClientId()Client identifier to group requests belonging to a specific entity. Example entities can be product ids, service names, user ids etc. Servers can use this to optimize placement, caching and colocation. TODO(b/329897437): Migrate to client_id in RequestOptions.
optional bytes client_id = 6;- Specified by:
hasClientIdin interfacePredict.PredictRequestOrBuilder- Returns:
- Whether the clientId field is set.
-
getClientId
public com.google.protobuf.ByteString getClientId()Client identifier to group requests belonging to a specific entity. Example entities can be product ids, service names, user ids etc. Servers can use this to optimize placement, caching and colocation. TODO(b/329897437): Migrate to client_id in RequestOptions.
optional bytes client_id = 6;- Specified by:
getClientIdin interfacePredict.PredictRequestOrBuilder- Returns:
- The clientId.
-
hasRequestOptions
public boolean hasRequestOptions()optional .tensorflow.serving.PredictRequest.RequestOptions request_options = 7;- Specified by:
hasRequestOptionsin interfacePredict.PredictRequestOrBuilder- Returns:
- Whether the requestOptions field is set.
-
getRequestOptions
optional .tensorflow.serving.PredictRequest.RequestOptions request_options = 7;- Specified by:
getRequestOptionsin interfacePredict.PredictRequestOrBuilder- Returns:
- The requestOptions.
-
getRequestOptionsOrBuilder
optional .tensorflow.serving.PredictRequest.RequestOptions request_options = 7;- Specified by:
getRequestOptionsOrBuilderin interfacePredict.PredictRequestOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Predict.PredictRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Predict.PredictRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Predict.PredictRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Predict.PredictRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Predict.PredictRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Predict.PredictRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Predict.PredictRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Predict.PredictRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static Predict.PredictRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static Predict.PredictRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Predict.PredictRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-