public static class OrtSession.RunOptions
extends java.lang.Object
implements java.lang.AutoCloseable
OrtSession.run(java.util.Map<java.lang.String, ai.onnxruntime.OnnxTensor>)
.Constructor and Description |
---|
RunOptions()
Creates a RunOptions.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
OrtLoggingLevel |
getLogLevel()
Gets the current logging level set on this RunOptions.
|
int |
getLogVerbosityLevel()
Gets the current logging verbosity level set on this RunOptions.
|
java.lang.String |
getRunTag()
Gets the String used to log information about this run.
|
void |
setLogLevel(OrtLoggingLevel level)
Sets the current logging level on this RunOptions.
|
void |
setLogVerbosityLevel(int level)
Sets the current logging verbosity level on this RunOptions.
|
void |
setRunTag(java.lang.String runTag)
Sets the run tag used in logging.
|
void |
setTerminate(boolean terminate)
Sets a flag so that all incomplete
OrtSession.run(java.util.Map<java.lang.String, ai.onnxruntime.OnnxTensor>) calls using this instance of RunOptions will terminate as soon as possible. |
public RunOptions() throws OrtException
OrtException
- If the construction of the native RunOptions failed.public void setLogLevel(OrtLoggingLevel level) throws OrtException
level
- The new logging level.OrtException
- If the native call failed.public OrtLoggingLevel getLogLevel() throws OrtException
OrtException
- If the native call failed.public void setLogVerbosityLevel(int level) throws OrtException
level
- The new logging verbosity level.OrtException
- If the native call failed.public int getLogVerbosityLevel() throws OrtException
OrtException
- If the native call failed.public void setRunTag(java.lang.String runTag) throws OrtException
runTag
- The run tag in logging output.OrtException
- If the native library call failed.public java.lang.String getRunTag() throws OrtException
OrtException
- If the native library call failed.public void setTerminate(boolean terminate) throws OrtException
OrtSession.run(java.util.Map<java.lang.String, ai.onnxruntime.OnnxTensor>)
calls using this instance of RunOptions
will terminate as soon as possible. If the flag is false, it resets this RunOptions
so it can be used with other calls to OrtSession.run(java.util.Map<java.lang.String, ai.onnxruntime.OnnxTensor>)
.terminate
- If true terminate all runs associated with this RunOptions.OrtException
- If the native library call failed.public void close()
close
in interface java.lang.AutoCloseable