# ORTRunOptions Class Reference

# ORTRunOptions

Objective-C

    @interface ORTRunOptions : NSObject

Swift

    class ORTRunOptions : NSObject

Options for configuring a run.

- `-init`

  Unavailable

  #### Declaration

  Objective-C

      - (instancetype)init NS_UNAVAILABLE;

- `-initWithError:`

  Creates run configuration options.

  #### Declaration

  Objective-C

      - (nullable instancetype)initWithError:(NSError *_Nullable *_Nullable)error;

  Swift

      init() throws

  #### Parameters

  `error` | Optional error information set if an error occurs.

  #### Return Value

  The instance, or nil if an error occurs.

- `-setLogTag:error:`

  Sets the run log tag.

  #### Declaration

  Objective-C

      - (BOOL)setLogTag:(nonnull NSString *)logTag
                  error:(NSError *_Nullable *_Nullable)error;

  Swift

      func setLogTag(_ logTag: String) throws

  #### Parameters

  `logTag` | The log tag.
  `error` | Optional error information set if an error occurs.

  #### Return Value

  Whether the option was set successfully.

- `-setLogSeverityLevel:error:`

  Sets the run log severity level.

  #### Declaration

  Objective-C

      - (BOOL)setLogSeverityLevel:(ORTLoggingLevel)loggingLevel
                            error:(NSError *_Nullable *_Nullable)error;

  Swift

      func setLogSeverityLevel(_ loggingLevel: ORTLoggingLevel) throws

  #### Parameters

  `loggingLevel` | The log severity level.
  `error` | Optional error information set if an error occurs.

  #### Return Value

  Whether the option was set successfully.

- `-addConfigEntryWithKey:value:error:`

  Sets a run configuration key-value pair. Any value for a previously set key will be overwritten. The run configuration keys and values are documented here: https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/session/onnxruntime_run_options_config_keys.h

  #### Declaration

  Objective-C

      - (BOOL)addConfigEntryWithKey:(nonnull NSString *)key
                              value:(nonnull NSString *)value
                              error:(NSError *_Nullable *_Nullable)error;

  Swift

      func addConfigEntry(withKey key: String, value: String) throws

  #### Parameters

  `key` | The key.
  `value` | The value.
  `error` | Optional error information set if an error occurs.

  #### Return Value

  Whether the option was set successfully.

© 2022 ONNX Runtime Authors. All rights reserved. (Last updated: 2022-10-22)

Generated by jazzy ♪♫ v0.14.3, a Realm project.