OnnxRuntime::InferenceSession
Inherits Reference / Object
Constructors
Class methods
Block-based API for RAII-style session management.
Example: InferenceSession.open("model.onnx") do |session| session.run({"input" => [1.0_f32]}) end
Set release_env: true to also release the global environment when the block exits.
Class method to explicitly release the environment This method is now a wrapper around OrtEnvironment.instance.release
Instance methods
Finalizer only releases session-specific resources Environment is managed separately and should be released explicitly by the user
Unified lifecycle API Alias for release_session (kept for API consistency with other wrapper classes)
Method to explicitly release the allocator Note: Default allocator may not need to be released, so commented out
ameba:disable Metrics/CyclomaticComplexity