ORTRunOptions

Objective-C

@interface ORTRunOptions : NSObject

Swift

class ORTRunOptions : NSObject

Options for configuring a run.

  • Unavailable

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • 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.

  • 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.

  • 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.

  • 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/master/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.