ONNX Runtime JavaScript API
    Preparing search index...

    Interface RunOptions

    A set of configurations for inference run behavior

    interface RunOptions {
        activeLoraAdapters?: readonly LoraAdapter[];
        extra?: Record<string, unknown>;
        logSeverityLevel?: 0 | 2 | 1 | 3 | 4;
        logVerbosityLevel?: number;
        tag?: string;
        terminate?: boolean;
    }
    Index

    Properties

    activeLoraAdapters?: readonly LoraAdapter[]

    A list of LoRA adapters to activate for this run. See LoraAdapter.

    The adapters must be created by the same backend as the session. Parameters of different adapters that are active at the same time must not overlap.

    This setting is available only in WebAssembly backend. It is not supported yet in proxy mode (env.wasm.proxy), or for a session that uses IO binding. IO binding is used when an output is preferred to be on GPU (see SessionOptions.preferredOutputLocation), when graph capture is enabled, and in some cases with the WebNN execution provider.

    extra?: Record<string, unknown>

    Set a single run configuration entry. See https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/session/ onnxruntime_run_options_config_keys.h

    This setting is available only in WebAssembly backend. Will support Node.js binding and react-native later

    extra: {
    memory: {
    enable_memory_arena_shrinkage: "1",
    }
    }
    logSeverityLevel?: 0 | 2 | 1 | 3 | 4

    Log severity level. See https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/common/logging/severity.h

    This setting is available only in ONNXRuntime (Node.js binding and react-native) or WebAssembly backend

    logVerbosityLevel?: number

    Log verbosity level.

    This setting is available only in WebAssembly backend. Will support Node.js binding and react-native later

    tag?: string

    A tag for the Run() calls using this

    This setting is available only in ONNXRuntime (Node.js binding and react-native) or WebAssembly backend

    terminate?: boolean

    Terminate all incomplete OrtRun calls as soon as possible if true

    This setting is available only in WebAssembly backend. Will support Node.js binding and react-native later