Class RunOptions.Builder

All Implemented Interfaces:
Message.Builder, MessageLite.Builder, MessageLiteOrBuilder, MessageOrBuilder, Cloneable, RunOptionsOrBuilder
Enclosing class:
RunOptions

public static final class RunOptions.Builder extends GeneratedMessage.Builder<RunOptions.Builder> implements RunOptionsOrBuilder
Options for a single Run() call.
Protobuf type tensorflow.RunOptions
  • Method Details

    • getDescriptor

      public static final Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class GeneratedMessage.Builder<RunOptions.Builder>
    • clear

      public RunOptions.Builder clear()
      Specified by:
      clear in interface Message.Builder
      Specified by:
      clear in interface MessageLite.Builder
      Overrides:
      clear in class GeneratedMessage.Builder<RunOptions.Builder>
    • getDescriptorForType

      public Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface Message.Builder
      Specified by:
      getDescriptorForType in interface MessageOrBuilder
      Overrides:
      getDescriptorForType in class GeneratedMessage.Builder<RunOptions.Builder>
    • getDefaultInstanceForType

      public RunOptions getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface MessageOrBuilder
    • build

      public RunOptions build()
      Specified by:
      build in interface Message.Builder
      Specified by:
      build in interface MessageLite.Builder
    • buildPartial

      public RunOptions buildPartial()
      Specified by:
      buildPartial in interface Message.Builder
      Specified by:
      buildPartial in interface MessageLite.Builder
    • mergeFrom

      public RunOptions.Builder mergeFrom(Message other)
      Specified by:
      mergeFrom in interface Message.Builder
      Overrides:
      mergeFrom in class AbstractMessage.Builder<RunOptions.Builder>
    • mergeFrom

      public RunOptions.Builder mergeFrom(RunOptions other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface MessageLiteOrBuilder
      Overrides:
      isInitialized in class GeneratedMessage.Builder<RunOptions.Builder>
    • mergeFrom

      public RunOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface Message.Builder
      Specified by:
      mergeFrom in interface MessageLite.Builder
      Overrides:
      mergeFrom in class AbstractMessage.Builder<RunOptions.Builder>
      Throws:
      IOException
    • getTraceLevelValue

      public int getTraceLevelValue()
      .tensorflow.RunOptions.TraceLevel trace_level = 1;
      Specified by:
      getTraceLevelValue in interface RunOptionsOrBuilder
      Returns:
      The enum numeric value on the wire for traceLevel.
    • setTraceLevelValue

      public RunOptions.Builder setTraceLevelValue(int value)
      .tensorflow.RunOptions.TraceLevel trace_level = 1;
      Parameters:
      value - The enum numeric value on the wire for traceLevel to set.
      Returns:
      This builder for chaining.
    • getTraceLevel

      public RunOptions.TraceLevel getTraceLevel()
      .tensorflow.RunOptions.TraceLevel trace_level = 1;
      Specified by:
      getTraceLevel in interface RunOptionsOrBuilder
      Returns:
      The traceLevel.
    • setTraceLevel

      public RunOptions.Builder setTraceLevel(RunOptions.TraceLevel value)
      .tensorflow.RunOptions.TraceLevel trace_level = 1;
      Parameters:
      value - The traceLevel to set.
      Returns:
      This builder for chaining.
    • clearTraceLevel

      public RunOptions.Builder clearTraceLevel()
      .tensorflow.RunOptions.TraceLevel trace_level = 1;
      Returns:
      This builder for chaining.
    • getTimeoutInMs

      public long getTimeoutInMs()
      Time to wait for operation to complete in milliseconds.
      
      int64 timeout_in_ms = 2;
      Specified by:
      getTimeoutInMs in interface RunOptionsOrBuilder
      Returns:
      The timeoutInMs.
    • setTimeoutInMs

      public RunOptions.Builder setTimeoutInMs(long value)
      Time to wait for operation to complete in milliseconds.
      
      int64 timeout_in_ms = 2;
      Parameters:
      value - The timeoutInMs to set.
      Returns:
      This builder for chaining.
    • clearTimeoutInMs

      public RunOptions.Builder clearTimeoutInMs()
      Time to wait for operation to complete in milliseconds.
      
      int64 timeout_in_ms = 2;
      Returns:
      This builder for chaining.
    • getInterOpThreadPool

      public int getInterOpThreadPool()
      The thread pool to use, if session_inter_op_thread_pool is configured.
      To use the caller thread set this to -1 - this uses the caller thread
      to execute Session::Run() and thus avoids a context switch. Using the
      caller thread to execute Session::Run() should be done ONLY for simple
      graphs, where the overhead of an additional context switch is
      comparable with the overhead of Session::Run().
      
      int32 inter_op_thread_pool = 3;
      Specified by:
      getInterOpThreadPool in interface RunOptionsOrBuilder
      Returns:
      The interOpThreadPool.
    • setInterOpThreadPool

      public RunOptions.Builder setInterOpThreadPool(int value)
      The thread pool to use, if session_inter_op_thread_pool is configured.
      To use the caller thread set this to -1 - this uses the caller thread
      to execute Session::Run() and thus avoids a context switch. Using the
      caller thread to execute Session::Run() should be done ONLY for simple
      graphs, where the overhead of an additional context switch is
      comparable with the overhead of Session::Run().
      
      int32 inter_op_thread_pool = 3;
      Parameters:
      value - The interOpThreadPool to set.
      Returns:
      This builder for chaining.
    • clearInterOpThreadPool

      public RunOptions.Builder clearInterOpThreadPool()
      The thread pool to use, if session_inter_op_thread_pool is configured.
      To use the caller thread set this to -1 - this uses the caller thread
      to execute Session::Run() and thus avoids a context switch. Using the
      caller thread to execute Session::Run() should be done ONLY for simple
      graphs, where the overhead of an additional context switch is
      comparable with the overhead of Session::Run().
      
      int32 inter_op_thread_pool = 3;
      Returns:
      This builder for chaining.
    • getOutputPartitionGraphs

      public boolean getOutputPartitionGraphs()
      Whether the partition graph(s) executed by the executor(s) should be
      outputted via RunMetadata.
      
      bool output_partition_graphs = 5;
      Specified by:
      getOutputPartitionGraphs in interface RunOptionsOrBuilder
      Returns:
      The outputPartitionGraphs.
    • setOutputPartitionGraphs

      public RunOptions.Builder setOutputPartitionGraphs(boolean value)
      Whether the partition graph(s) executed by the executor(s) should be
      outputted via RunMetadata.
      
      bool output_partition_graphs = 5;
      Parameters:
      value - The outputPartitionGraphs to set.
      Returns:
      This builder for chaining.
    • clearOutputPartitionGraphs

      public RunOptions.Builder clearOutputPartitionGraphs()
      Whether the partition graph(s) executed by the executor(s) should be
      outputted via RunMetadata.
      
      bool output_partition_graphs = 5;
      Returns:
      This builder for chaining.
    • hasDebugOptions

      public boolean hasDebugOptions()
      EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
      
      .tensorflow.DebugOptions debug_options = 6;
      Specified by:
      hasDebugOptions in interface RunOptionsOrBuilder
      Returns:
      Whether the debugOptions field is set.
    • getDebugOptions

      public DebugOptions getDebugOptions()
      EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
      
      .tensorflow.DebugOptions debug_options = 6;
      Specified by:
      getDebugOptions in interface RunOptionsOrBuilder
      Returns:
      The debugOptions.
    • setDebugOptions

      public RunOptions.Builder setDebugOptions(DebugOptions value)
      EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
      
      .tensorflow.DebugOptions debug_options = 6;
    • setDebugOptions

      public RunOptions.Builder setDebugOptions(DebugOptions.Builder builderForValue)
      EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
      
      .tensorflow.DebugOptions debug_options = 6;
    • mergeDebugOptions

      public RunOptions.Builder mergeDebugOptions(DebugOptions value)
      EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
      
      .tensorflow.DebugOptions debug_options = 6;
    • clearDebugOptions

      public RunOptions.Builder clearDebugOptions()
      EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
      
      .tensorflow.DebugOptions debug_options = 6;
    • getDebugOptionsBuilder

      public DebugOptions.Builder getDebugOptionsBuilder()
      EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
      
      .tensorflow.DebugOptions debug_options = 6;
    • getDebugOptionsOrBuilder

      public DebugOptionsOrBuilder getDebugOptionsOrBuilder()
      EXPERIMENTAL.  Options used to initialize DebuggerState, if enabled.
      
      .tensorflow.DebugOptions debug_options = 6;
      Specified by:
      getDebugOptionsOrBuilder in interface RunOptionsOrBuilder
    • getReportTensorAllocationsUponOom

      public boolean getReportTensorAllocationsUponOom()
      When enabled, causes tensor allocation information to be included in
      the error message when the Run() call fails because the allocator ran
      out of memory (OOM).
      
      Enabling this option can slow down the Run() call.
      
      bool report_tensor_allocations_upon_oom = 7;
      Specified by:
      getReportTensorAllocationsUponOom in interface RunOptionsOrBuilder
      Returns:
      The reportTensorAllocationsUponOom.
    • setReportTensorAllocationsUponOom

      public RunOptions.Builder setReportTensorAllocationsUponOom(boolean value)
      When enabled, causes tensor allocation information to be included in
      the error message when the Run() call fails because the allocator ran
      out of memory (OOM).
      
      Enabling this option can slow down the Run() call.
      
      bool report_tensor_allocations_upon_oom = 7;
      Parameters:
      value - The reportTensorAllocationsUponOom to set.
      Returns:
      This builder for chaining.
    • clearReportTensorAllocationsUponOom

      public RunOptions.Builder clearReportTensorAllocationsUponOom()
      When enabled, causes tensor allocation information to be included in
      the error message when the Run() call fails because the allocator ran
      out of memory (OOM).
      
      Enabling this option can slow down the Run() call.
      
      bool report_tensor_allocations_upon_oom = 7;
      Returns:
      This builder for chaining.
    • hasExperimental

      public boolean hasExperimental()
      .tensorflow.RunOptions.Experimental experimental = 8;
      Specified by:
      hasExperimental in interface RunOptionsOrBuilder
      Returns:
      Whether the experimental field is set.
    • getExperimental

      public RunOptions.Experimental getExperimental()
      .tensorflow.RunOptions.Experimental experimental = 8;
      Specified by:
      getExperimental in interface RunOptionsOrBuilder
      Returns:
      The experimental.
    • setExperimental

      public RunOptions.Builder setExperimental(RunOptions.Experimental value)
      .tensorflow.RunOptions.Experimental experimental = 8;
    • setExperimental

      public RunOptions.Builder setExperimental(RunOptions.Experimental.Builder builderForValue)
      .tensorflow.RunOptions.Experimental experimental = 8;
    • mergeExperimental

      public RunOptions.Builder mergeExperimental(RunOptions.Experimental value)
      .tensorflow.RunOptions.Experimental experimental = 8;
    • clearExperimental

      public RunOptions.Builder clearExperimental()
      .tensorflow.RunOptions.Experimental experimental = 8;
    • getExperimentalBuilder

      public RunOptions.Experimental.Builder getExperimentalBuilder()
      .tensorflow.RunOptions.Experimental experimental = 8;
    • getExperimentalOrBuilder

      public RunOptions.ExperimentalOrBuilder getExperimentalOrBuilder()
      .tensorflow.RunOptions.Experimental experimental = 8;
      Specified by:
      getExperimentalOrBuilder in interface RunOptionsOrBuilder