Package inference

Class ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
inference.ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ModelConfigOuterClass.ModelSequenceBatching.StrategyOldestOrBuilder, Cloneable
Enclosing class:
ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest

public static final class ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder> implements ModelConfigOuterClass.ModelSequenceBatching.StrategyOldestOrBuilder
@@  .. cpp:var:: message StrategyOldest
@@
@@     The sequence batcher maintains up to 'max_candidate_sequences'
@@     candidate sequences. 'max_candidate_sequences' can be greater
@@     than the model's 'max_batch_size'. For inferencing the batcher
@@     chooses from the candidate sequences up to 'max_batch_size'
@@     inference requests. Requests are chosen in an oldest-first
@@     manner across all candidate sequences. A given sequence is
@@     not guaranteed to be assigned to the same batch slot for
@@     all inference requests of that sequence.
@@
 
Protobuf type inference.ModelSequenceBatching.StrategyOldest
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
    • getDefaultInstanceForType

      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
    • setField

      public ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
    • clearField

      public ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
    • clearOneof

      public ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
    • setRepeatedField

      public ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
    • addRepeatedField

      public ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
    • mergeFrom

      public ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
    • mergeFrom

      public ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
      Throws:
      IOException
    • getMaxCandidateSequences

      public int getMaxCandidateSequences()
      @@    .. cpp:var:: int32 max_candidate_sequences
      @@
      @@       Maximum number of candidate sequences that the batcher
      @@       maintains. Excess sequences are kept in an ordered backlog
      @@       and become candidates when existing candidate sequences
      @@       complete.
      @@
       
      int32 max_candidate_sequences = 1;
      Specified by:
      getMaxCandidateSequences in interface ModelConfigOuterClass.ModelSequenceBatching.StrategyOldestOrBuilder
      Returns:
      The maxCandidateSequences.
    • setMaxCandidateSequences

      public ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder setMaxCandidateSequences(int value)
      @@    .. cpp:var:: int32 max_candidate_sequences
      @@
      @@       Maximum number of candidate sequences that the batcher
      @@       maintains. Excess sequences are kept in an ordered backlog
      @@       and become candidates when existing candidate sequences
      @@       complete.
      @@
       
      int32 max_candidate_sequences = 1;
      Parameters:
      value - The maxCandidateSequences to set.
      Returns:
      This builder for chaining.
    • clearMaxCandidateSequences

      @@    .. cpp:var:: int32 max_candidate_sequences
      @@
      @@       Maximum number of candidate sequences that the batcher
      @@       maintains. Excess sequences are kept in an ordered backlog
      @@       and become candidates when existing candidate sequences
      @@       complete.
      @@
       
      int32 max_candidate_sequences = 1;
      Returns:
      This builder for chaining.
    • getPreferredBatchSizeList

      public List<Integer> getPreferredBatchSizeList()
      @@    .. cpp:var:: int32 preferred_batch_size (repeated)
      @@
      @@       Preferred batch sizes for dynamic batching of candidate
      @@       sequences. If a batch of one of these sizes can be formed
      @@       it will be executed immediately. If not specified a
      @@       preferred batch size will be chosen automatically
      @@       based on model and GPU characteristics.
      @@
       
      repeated int32 preferred_batch_size = 2;
      Specified by:
      getPreferredBatchSizeList in interface ModelConfigOuterClass.ModelSequenceBatching.StrategyOldestOrBuilder
      Returns:
      A list containing the preferredBatchSize.
    • getPreferredBatchSizeCount

      public int getPreferredBatchSizeCount()
      @@    .. cpp:var:: int32 preferred_batch_size (repeated)
      @@
      @@       Preferred batch sizes for dynamic batching of candidate
      @@       sequences. If a batch of one of these sizes can be formed
      @@       it will be executed immediately. If not specified a
      @@       preferred batch size will be chosen automatically
      @@       based on model and GPU characteristics.
      @@
       
      repeated int32 preferred_batch_size = 2;
      Specified by:
      getPreferredBatchSizeCount in interface ModelConfigOuterClass.ModelSequenceBatching.StrategyOldestOrBuilder
      Returns:
      The count of preferredBatchSize.
    • getPreferredBatchSize

      public int getPreferredBatchSize(int index)
      @@    .. cpp:var:: int32 preferred_batch_size (repeated)
      @@
      @@       Preferred batch sizes for dynamic batching of candidate
      @@       sequences. If a batch of one of these sizes can be formed
      @@       it will be executed immediately. If not specified a
      @@       preferred batch size will be chosen automatically
      @@       based on model and GPU characteristics.
      @@
       
      repeated int32 preferred_batch_size = 2;
      Specified by:
      getPreferredBatchSize in interface ModelConfigOuterClass.ModelSequenceBatching.StrategyOldestOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The preferredBatchSize at the given index.
    • setPreferredBatchSize

      public ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder setPreferredBatchSize(int index, int value)
      @@    .. cpp:var:: int32 preferred_batch_size (repeated)
      @@
      @@       Preferred batch sizes for dynamic batching of candidate
      @@       sequences. If a batch of one of these sizes can be formed
      @@       it will be executed immediately. If not specified a
      @@       preferred batch size will be chosen automatically
      @@       based on model and GPU characteristics.
      @@
       
      repeated int32 preferred_batch_size = 2;
      Parameters:
      index - The index to set the value at.
      value - The preferredBatchSize to set.
      Returns:
      This builder for chaining.
    • addPreferredBatchSize

      @@    .. cpp:var:: int32 preferred_batch_size (repeated)
      @@
      @@       Preferred batch sizes for dynamic batching of candidate
      @@       sequences. If a batch of one of these sizes can be formed
      @@       it will be executed immediately. If not specified a
      @@       preferred batch size will be chosen automatically
      @@       based on model and GPU characteristics.
      @@
       
      repeated int32 preferred_batch_size = 2;
      Parameters:
      value - The preferredBatchSize to add.
      Returns:
      This builder for chaining.
    • addAllPreferredBatchSize

      public ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder addAllPreferredBatchSize(Iterable<? extends Integer> values)
      @@    .. cpp:var:: int32 preferred_batch_size (repeated)
      @@
      @@       Preferred batch sizes for dynamic batching of candidate
      @@       sequences. If a batch of one of these sizes can be formed
      @@       it will be executed immediately. If not specified a
      @@       preferred batch size will be chosen automatically
      @@       based on model and GPU characteristics.
      @@
       
      repeated int32 preferred_batch_size = 2;
      Parameters:
      values - The preferredBatchSize to add.
      Returns:
      This builder for chaining.
    • clearPreferredBatchSize

      @@    .. cpp:var:: int32 preferred_batch_size (repeated)
      @@
      @@       Preferred batch sizes for dynamic batching of candidate
      @@       sequences. If a batch of one of these sizes can be formed
      @@       it will be executed immediately. If not specified a
      @@       preferred batch size will be chosen automatically
      @@       based on model and GPU characteristics.
      @@
       
      repeated int32 preferred_batch_size = 2;
      Returns:
      This builder for chaining.
    • getMaxQueueDelayMicroseconds

      public long getMaxQueueDelayMicroseconds()
      @@    .. cpp:var:: uint64 max_queue_delay_microseconds
      @@
      @@       The maximum time, in microseconds, a candidate request
      @@       will be delayed in the dynamic batch scheduling queue to
      @@       wait for additional requests for batching. Default is 0.
      @@
       
      uint64 max_queue_delay_microseconds = 3;
      Specified by:
      getMaxQueueDelayMicroseconds in interface ModelConfigOuterClass.ModelSequenceBatching.StrategyOldestOrBuilder
      Returns:
      The maxQueueDelayMicroseconds.
    • setMaxQueueDelayMicroseconds

      public ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder setMaxQueueDelayMicroseconds(long value)
      @@    .. cpp:var:: uint64 max_queue_delay_microseconds
      @@
      @@       The maximum time, in microseconds, a candidate request
      @@       will be delayed in the dynamic batch scheduling queue to
      @@       wait for additional requests for batching. Default is 0.
      @@
       
      uint64 max_queue_delay_microseconds = 3;
      Parameters:
      value - The maxQueueDelayMicroseconds to set.
      Returns:
      This builder for chaining.
    • clearMaxQueueDelayMicroseconds

      @@    .. cpp:var:: uint64 max_queue_delay_microseconds
      @@
      @@       The maximum time, in microseconds, a candidate request
      @@       will be delayed in the dynamic batch scheduling queue to
      @@       wait for additional requests for batching. Default is 0.
      @@
       
      uint64 max_queue_delay_microseconds = 3;
      Returns:
      This builder for chaining.
    • getPreserveOrdering

      public boolean getPreserveOrdering()
      @@    .. cpp:var:: bool preserve_ordering
      @@
      @@       Should the dynamic batcher preserve the ordering of responses to
      @@       match the order of requests received by the scheduler. Default is
      @@       false. If true, the responses will be returned in the same order
      @@       as the order of requests sent to the scheduler. If false, the
      @@       responses may be returned in arbitrary order. This option is
      @@       specifically needed when a sequence of related inference requests
      @@       (i.e. inference requests with the same correlation ID) are sent
      @@       to the dynamic batcher to ensure that the sequence responses are
      @@       in the correct order.
      @@
      @@       When using decoupled models, setting this to true may block the
      @@       responses from independent sequences from being returned to the
      @@       client until the previous request completes, hurting overall
      @@       performance. If using GRPC streaming protocol, the stream
      @@       ordering guarantee may be sufficient alone to ensure the
      @@       responses for each sequence are returned in sequence-order
      @@       without blocking based on independent requests, depending on the
      @@       use case.
      @@
       
      bool preserve_ordering = 4;
      Specified by:
      getPreserveOrdering in interface ModelConfigOuterClass.ModelSequenceBatching.StrategyOldestOrBuilder
      Returns:
      The preserveOrdering.
    • setPreserveOrdering

      public ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder setPreserveOrdering(boolean value)
      @@    .. cpp:var:: bool preserve_ordering
      @@
      @@       Should the dynamic batcher preserve the ordering of responses to
      @@       match the order of requests received by the scheduler. Default is
      @@       false. If true, the responses will be returned in the same order
      @@       as the order of requests sent to the scheduler. If false, the
      @@       responses may be returned in arbitrary order. This option is
      @@       specifically needed when a sequence of related inference requests
      @@       (i.e. inference requests with the same correlation ID) are sent
      @@       to the dynamic batcher to ensure that the sequence responses are
      @@       in the correct order.
      @@
      @@       When using decoupled models, setting this to true may block the
      @@       responses from independent sequences from being returned to the
      @@       client until the previous request completes, hurting overall
      @@       performance. If using GRPC streaming protocol, the stream
      @@       ordering guarantee may be sufficient alone to ensure the
      @@       responses for each sequence are returned in sequence-order
      @@       without blocking based on independent requests, depending on the
      @@       use case.
      @@
       
      bool preserve_ordering = 4;
      Parameters:
      value - The preserveOrdering to set.
      Returns:
      This builder for chaining.
    • clearPreserveOrdering

      @@    .. cpp:var:: bool preserve_ordering
      @@
      @@       Should the dynamic batcher preserve the ordering of responses to
      @@       match the order of requests received by the scheduler. Default is
      @@       false. If true, the responses will be returned in the same order
      @@       as the order of requests sent to the scheduler. If false, the
      @@       responses may be returned in arbitrary order. This option is
      @@       specifically needed when a sequence of related inference requests
      @@       (i.e. inference requests with the same correlation ID) are sent
      @@       to the dynamic batcher to ensure that the sequence responses are
      @@       in the correct order.
      @@
      @@       When using decoupled models, setting this to true may block the
      @@       responses from independent sequences from being returned to the
      @@       client until the previous request completes, hurting overall
      @@       performance. If using GRPC streaming protocol, the stream
      @@       ordering guarantee may be sufficient alone to ensure the
      @@       responses for each sequence are returned in sequence-order
      @@       without blocking based on independent requests, depending on the
      @@       use case.
      @@
       
      bool preserve_ordering = 4;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>
    • mergeUnknownFields

      public final ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ModelConfigOuterClass.ModelSequenceBatching.StrategyOldest.Builder>