Table of Contents

Interface IOnnxModelStore

Namespace
Qavren.Edge.Onnx
Assembly
Qavren.Edge.Onnx.dll

The one thing that decides whether a model is on disk. Idempotent, concurrency-safe, and the only writer of the .qavren-model.json marker.

public interface IOnnxModelStore

Properties

ProvisionedModelIds

Every model id this store has provisioned in this process.

Methods

EnsureAsync(OnnxModelManifest, IProgress<ModelProvisioningProgress>?, CancellationToken)

Idempotent and concurrency-safe: one SemaphoreSlim per model id, so eight concurrent callers produce one provisioning. Sources are probed in registration order.

IsProvisioned(OnnxModelManifest)

Whether the marker exists and every file's length matches. Deliberately NOT a re-hash: full re-hashing on every launch is a startup tax paid for a case the provisioning-time verify already covers.

RemoveAsync(string, CancellationToken)

Deletes the model directory and its CoreML cache subtree.

TryGet(string)

The result of the last successful EnsureAsync(OnnxModelManifest, IProgress<ModelProvisioningProgress>?, CancellationToken) for this id, if any.