Class RunOptions
Sets various runtime options.
Inheritance
Implements
Inherited Members
Namespace: Microsoft.ML.OnnxRuntime
Assembly: Microsoft.ML.OnnxRuntime.dll
Syntax
public class RunOptions : SafeHandle, IDisposable
Constructors
| Improve this Doc View SourceRunOptions()
Default __ctor. Creates default RuntimeOptions
Declaration
public RunOptions()
Properties
| Improve this Doc View SourceIsInvalid
Overrides SafeHandle.IsInvalid
Declaration
public override bool IsInvalid { get; }
Property Value
Type | Description |
---|---|
Boolean | returns true if handle is equal to Zero |
Overrides
LogId
Log tag to be used during the run. default = ""
Declaration
public string LogId { get; set; }
Property Value
Type | Description |
---|---|
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 |
---|---|
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 |
---|---|
Boolean | terminate flag value |
Methods
| Improve this Doc View SourceAddActiveLoraAdapter(OrtLoraAdapter)
Appends the specified lora adapter to the list of active lora adapters for this RunOptions instance. All run calls with this instant will make use of the activated Lora Adapters. An adapter is considered active if it is added to RunOptions that are used during Run() calls.
Declaration
public void AddActiveLoraAdapter(OrtLoraAdapter loraAdapter)
Parameters
Type | Name | Description |
---|---|---|
OrtLoraAdapter | loraAdapter | Lora adapter instance |
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 |
---|---|---|
String | configKey | config key name |
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 |
---|---|
Boolean | always returns true |