Table of Contents

Class LocalModelProvider

Namespace
InferenceEngine.Core.ModelProviders
Assembly
InferenceEngine.Core.dll

Model provider for locally stored model files. Validates that the file exists but does not perform any network operations.

public class LocalModelProvider : IModelProvider
Inheritance
LocalModelProvider
Implements
Inherited Members

Constructors

LocalModelProvider(string)

Creates a provider for a local model file.

public LocalModelProvider(string modelPath)

Parameters

modelPath string

Absolute or relative path to the .onnx model file

Properties

ModelPath

The model file path (absolute or relative).

public string ModelPath { get; }

Property Value

string

Methods

GetModelPathAsync(CancellationToken)

Gets the local path to the model file. Implementations should ensure the model is available at the returned path (downloading if necessary) before returning.

public Task<string> GetModelPathAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancellation token for the operation

Returns

Task<string>

Absolute path to the .onnx model file