Show / Hide Table of Contents

Class RunOptions

Sets various runtime options.

Inheritance
System.Object
RunOptions
Namespace: Microsoft.ML.OnnxRuntime
Assembly: cs.temp.dll.dll
Syntax
public class RunOptions : SafeHandle

Constructors

RunOptions()

Default __ctor. Creates default RuntimeOptions

Declaration
public RunOptions()

Properties

IsInvalid

Overrides SafeHandle.IsInvalid

Declaration
public override bool IsInvalid { get; }
Property Value
Type Description
System.Boolean

returns true if handle is equal to Zero

LogId

Log tag to be used during the run. default = ""

Declaration
public string LogId { get; set; }
Property Value
Type Description
System.String

LogSeverityLevel

Log Severity Level for the session logs. Default = ORT_LOGGING_LEVEL_WARNING

Declaration
public OrtLoggingLevel LogSeverityLevel { get; set; }
Property Value
Type Description
OrtLoggingLevel

LogVerbosityLevel

Log Verbosity Level for the session logs. Default = 0. Valid values are >=0. This takes into effect only when the LogSeverityLevel is set to ORT_LOGGING_LEVEL_VERBOSE.

Declaration
public int LogVerbosityLevel { get; set; }
Property Value
Type Description
System.Int32

Terminate

Sets a flag to terminate all Run() calls that are currently using this RunOptions object Default = false

Declaration
public bool Terminate { get; set; }
Property Value
Type Description
System.Boolean

terminate flag value

Methods

AddRunConfigEntry(String, String)

Set a single run configuration entry as a pair of strings If a configuration with same key exists, this will overwrite the configuration with the given configValue.

Declaration
public void AddRunConfigEntry(string configKey, string configValue)
Parameters
Type Name Description
System.String configKey

config key name

System.String configValue

config key value

ReleaseHandle()

Overrides SafeHandle.ReleaseHandle() to properly dispose of the native instance of RunOptions

Declaration
protected override bool ReleaseHandle()
Returns
Type Description
System.Boolean

always returns true

In This Article
Back to top