Package org.tensorflow.framework
Class BatchingOptions.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BatchingOptions.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
org.tensorflow.framework.BatchingOptions.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable,BatchingOptionsOrBuilder
- Enclosing class:
BatchingOptions
public static final class BatchingOptions.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
implements BatchingOptionsOrBuilder
Protobuf type
tensorflow.BatchingOptions-
Method Summary
Modifier and TypeMethodDescriptionaddAllAllowedBatchSizes(Iterable<? extends Integer> values) Optional list of allowed batch sizes.addAllowedBatchSizes(int value) Optional list of allowed batch sizes.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()Optional list of allowed batch sizes.Maximum number of microseconds to wait before outputting an incomplete batch.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) The maximum allowed batch size.Maximum number of batches enqueued for processing before requests are failed fast.Number of scheduling threads for processing batches of work.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) clone()intgetAllowedBatchSizes(int index) Optional list of allowed batch sizes.intOptional list of allowed batch sizes.Optional list of allowed batch sizes.intMaximum number of microseconds to wait before outputting an incomplete batch.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorintThe maximum allowed batch size.intMaximum number of batches enqueued for processing before requests are failed fast.intNumber of scheduling threads for processing batches of work.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(BatchingOptions other) final BatchingOptions.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setAllowedBatchSizes(int index, int value) Optional list of allowed batch sizes.setBatchTimeoutMicros(int value) Maximum number of microseconds to wait before outputting an incomplete batch.setMaxBatchSize(int value) The maximum allowed batch size.setMaxEnqueuedBatches(int value) Maximum number of batches enqueued for processing before requests are failed fast.setNumBatchThreads(int value) Number of scheduling threads for processing batches of work.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) final BatchingOptions.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
-
setField
public BatchingOptions.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
-
setRepeatedField
public BatchingOptions.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
-
addRepeatedField
public BatchingOptions.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<BatchingOptions.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
-
mergeFrom
public BatchingOptions.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<BatchingOptions.Builder>- Throws:
IOException
-
getNumBatchThreads
public int getNumBatchThreads()Number of scheduling threads for processing batches of work. Determines the number of batches processed in parallel. This should be roughly in line with the number of TPU cores available.
int32 num_batch_threads = 1;- Specified by:
getNumBatchThreadsin interfaceBatchingOptionsOrBuilder- Returns:
- The numBatchThreads.
-
setNumBatchThreads
Number of scheduling threads for processing batches of work. Determines the number of batches processed in parallel. This should be roughly in line with the number of TPU cores available.
int32 num_batch_threads = 1;- Parameters:
value- The numBatchThreads to set.- Returns:
- This builder for chaining.
-
clearNumBatchThreads
Number of scheduling threads for processing batches of work. Determines the number of batches processed in parallel. This should be roughly in line with the number of TPU cores available.
int32 num_batch_threads = 1;- Returns:
- This builder for chaining.
-
getMaxBatchSize
public int getMaxBatchSize()The maximum allowed batch size. Can be larger than allowed_batch_sizes to utilize large batch splitting.
int32 max_batch_size = 2;- Specified by:
getMaxBatchSizein interfaceBatchingOptionsOrBuilder- Returns:
- The maxBatchSize.
-
setMaxBatchSize
The maximum allowed batch size. Can be larger than allowed_batch_sizes to utilize large batch splitting.
int32 max_batch_size = 2;- Parameters:
value- The maxBatchSize to set.- Returns:
- This builder for chaining.
-
clearMaxBatchSize
The maximum allowed batch size. Can be larger than allowed_batch_sizes to utilize large batch splitting.
int32 max_batch_size = 2;- Returns:
- This builder for chaining.
-
getBatchTimeoutMicros
public int getBatchTimeoutMicros()Maximum number of microseconds to wait before outputting an incomplete batch.
int32 batch_timeout_micros = 3;- Specified by:
getBatchTimeoutMicrosin interfaceBatchingOptionsOrBuilder- Returns:
- The batchTimeoutMicros.
-
setBatchTimeoutMicros
Maximum number of microseconds to wait before outputting an incomplete batch.
int32 batch_timeout_micros = 3;- Parameters:
value- The batchTimeoutMicros to set.- Returns:
- This builder for chaining.
-
clearBatchTimeoutMicros
Maximum number of microseconds to wait before outputting an incomplete batch.
int32 batch_timeout_micros = 3;- Returns:
- This builder for chaining.
-
getAllowedBatchSizesList
Optional list of allowed batch sizes. If left empty, does nothing. Otherwise, supplies a list of batch sizes, causing the op to pad batches up to one of those sizes. The entries must increase monotonically, and the final entry must be equal or less than the max_batch_size.
repeated int32 allowed_batch_sizes = 4;- Specified by:
getAllowedBatchSizesListin interfaceBatchingOptionsOrBuilder- Returns:
- A list containing the allowedBatchSizes.
-
getAllowedBatchSizesCount
public int getAllowedBatchSizesCount()Optional list of allowed batch sizes. If left empty, does nothing. Otherwise, supplies a list of batch sizes, causing the op to pad batches up to one of those sizes. The entries must increase monotonically, and the final entry must be equal or less than the max_batch_size.
repeated int32 allowed_batch_sizes = 4;- Specified by:
getAllowedBatchSizesCountin interfaceBatchingOptionsOrBuilder- Returns:
- The count of allowedBatchSizes.
-
getAllowedBatchSizes
public int getAllowedBatchSizes(int index) Optional list of allowed batch sizes. If left empty, does nothing. Otherwise, supplies a list of batch sizes, causing the op to pad batches up to one of those sizes. The entries must increase monotonically, and the final entry must be equal or less than the max_batch_size.
repeated int32 allowed_batch_sizes = 4;- Specified by:
getAllowedBatchSizesin interfaceBatchingOptionsOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The allowedBatchSizes at the given index.
-
setAllowedBatchSizes
Optional list of allowed batch sizes. If left empty, does nothing. Otherwise, supplies a list of batch sizes, causing the op to pad batches up to one of those sizes. The entries must increase monotonically, and the final entry must be equal or less than the max_batch_size.
repeated int32 allowed_batch_sizes = 4;- Parameters:
index- The index to set the value at.value- The allowedBatchSizes to set.- Returns:
- This builder for chaining.
-
addAllowedBatchSizes
Optional list of allowed batch sizes. If left empty, does nothing. Otherwise, supplies a list of batch sizes, causing the op to pad batches up to one of those sizes. The entries must increase monotonically, and the final entry must be equal or less than the max_batch_size.
repeated int32 allowed_batch_sizes = 4;- Parameters:
value- The allowedBatchSizes to add.- Returns:
- This builder for chaining.
-
addAllAllowedBatchSizes
Optional list of allowed batch sizes. If left empty, does nothing. Otherwise, supplies a list of batch sizes, causing the op to pad batches up to one of those sizes. The entries must increase monotonically, and the final entry must be equal or less than the max_batch_size.
repeated int32 allowed_batch_sizes = 4;- Parameters:
values- The allowedBatchSizes to add.- Returns:
- This builder for chaining.
-
clearAllowedBatchSizes
Optional list of allowed batch sizes. If left empty, does nothing. Otherwise, supplies a list of batch sizes, causing the op to pad batches up to one of those sizes. The entries must increase monotonically, and the final entry must be equal or less than the max_batch_size.
repeated int32 allowed_batch_sizes = 4;- Returns:
- This builder for chaining.
-
getMaxEnqueuedBatches
public int getMaxEnqueuedBatches()Maximum number of batches enqueued for processing before requests are failed fast.
int32 max_enqueued_batches = 5;- Specified by:
getMaxEnqueuedBatchesin interfaceBatchingOptionsOrBuilder- Returns:
- The maxEnqueuedBatches.
-
setMaxEnqueuedBatches
Maximum number of batches enqueued for processing before requests are failed fast.
int32 max_enqueued_batches = 5;- Parameters:
value- The maxEnqueuedBatches to set.- Returns:
- This builder for chaining.
-
clearMaxEnqueuedBatches
Maximum number of batches enqueued for processing before requests are failed fast.
int32 max_enqueued_batches = 5;- Returns:
- This builder for chaining.
-
setUnknownFields
public final BatchingOptions.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
-
mergeUnknownFields
public final BatchingOptions.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder>
-