Class OrtSession.RunOptions

    • Constructor Detail

      • RunOptions

        public RunOptions()
                   throws OrtException
        Creates a RunOptions.
        Throws:
        OrtException - If the construction of the native RunOptions failed.
    • Method Detail

      • setLogLevel

        public void setLogLevel​(OrtLoggingLevel level)
                         throws OrtException
        Sets the current logging level on this RunOptions.
        Parameters:
        level - The new logging level.
        Throws:
        OrtException - If the native call failed.
      • getLogLevel

        public OrtLoggingLevel getLogLevel()
                                    throws OrtException
        Gets the current logging level set on this RunOptions.
        Returns:
        The logging level.
        Throws:
        OrtException - If the native call failed.
      • setLogVerbosityLevel

        public void setLogVerbosityLevel​(int level)
                                  throws OrtException
        Sets the current logging verbosity level on this RunOptions.
        Parameters:
        level - The new logging verbosity level.
        Throws:
        OrtException - If the native call failed.
      • getLogVerbosityLevel

        public int getLogVerbosityLevel()
                                 throws OrtException
        Gets the current logging verbosity level set on this RunOptions.
        Returns:
        The logging verbosity level.
        Throws:
        OrtException - If the native call failed.
      • setRunTag

        public void setRunTag​(java.lang.String runTag)
                       throws OrtException
        Sets the run tag used in logging.
        Parameters:
        runTag - The run tag in logging output.
        Throws:
        OrtException - If the native library call failed.
      • getRunTag

        public java.lang.String getRunTag()
                                   throws OrtException
        Gets the String used to log information about this run.
        Returns:
        The run tag.
        Throws:
        OrtException - If the native library call failed.
      • addRunConfigEntry

        public void addRunConfigEntry​(java.lang.String key,
                                      java.lang.String value)
                               throws OrtException
        Adds a configuration entry to this RunOptions.

        Setting the same key will overwrite the value.

        Parameters:
        key - The configuration key.
        value - The configuration value.
        Throws:
        OrtException - If the native library call failed.
      • addActiveLoraAdapter

        public void addActiveLoraAdapter​(OrtLoraAdapter loraAdapter)
                                  throws OrtException
        Adds the specified adapter to the list of active adapters for this run.
        Parameters:
        loraAdapter - valid OrtLoraAdapter object
        Throws:
        OrtException - of the native library call failed
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable