Skip to content

LinML v0.3.0

Choose a tag to compare

@github-actions github-actions released this 12 Oct 09:12
· 53 commits to main since this release

LinML v0.3.0 — Model Inspection & Hardened Foundations

🎯 Highlights

  • New linml inspect command — inspect ONNX models without running inference. Reports model identity (SHA-256, size), IR version, opset imports, producer metadata, input/output tensor shapes & dynamic dimensions, graph structure (node count, distinct operators), and per-execution-provider compatibility warnings.
  • Streaming, memory-safe inspection — large models no longer loaded entirely into managed memory; SHA-256 and protobuf parsing stream via FileStream.
  • Hardened protobuf parser — varint length limits, bounds-checked seeks, and graceful error handling for malformed/corrupted ONNX files.
  • Complete fixture & test alignment — fixture model regenerated with stable tensor names (x/y); all integration tests, inputs.json, and manifest updated consistently.

✨ New Features

linml inspect

# Human-readable output
linml inspect --model model.onnx

# Machine-readable JSON for tooling
linml inspect --model model.onnx --json

Report includes:

  • Model identity: file path, SHA-256, size in bytes
  • ONNX metadata: IR version, opset imports (domain + version), producer name/version, domain, model version, description, custom metadata properties
  • Tensor signatures: for each input/output — name, data type, shape, static/dynamic status, symbolic dimension names
  • Graph topology: node count, distinct operator types (alphabetically sorted)
  • Execution Provider compatibility advisories (per provider):
    • CUDA: cuDNN requirement for convolutions, FP16 Tensor Core hints
    • TensorRT: dynamic dimension warnings, unsupported operator list (control flow, NMS, etc.)
    • OpenVINO: opset version ceiling (≤ 21)
    • MIGraphX: control-flow partitioning to CPU

Contracts & Internals

  • IModelInspector / ModelInspectionReport — strongly-typed contracts in LinML.Contracts for programmatic access
  • OnnxModelInspector — combines streaming protobuf parsing (OnnxProtobufReader) with InferenceSession metadata
  • EpCompatibilityAnalyzer — static analysis of operators, opsets, and tensor dimensions for EP-specific warnings

🔧 Fixes & Improvements

Area Change
Memory InspectAsync streams file twice (hash + parse) instead of ReadAllBytesAsync — no OOM on large models
Safety ReadVarint caps at 10 bytes; all length-delimited seeks validated against stream bounds
Robustness Protobuf parser throws InvalidDataException on malformed input instead of crashing/looping
Fallback When InferenceSession fails to open, inspector attempts protobuf tensor extraction (hook in place; full fallback planned)
Output Human-readable report now shows symbolic dimensions for outputs (previously only inputs)
Fixtures Test fixture regenerated with x/y tensor names; inputs.json, fixture-manifest.json, and all 6 integration test files updated

🧪 Quality

  • Build: dotnet build --warnaserror — 0 warnings, 0 errors
  • Tests passing locally: Integration (20/20), Runtime.Onnx (26/26), CLI inspect (4/4), Policy (23/23), Catalog (33/33)
  • CI: GitHub Actions upgraded to latest action versions (checkout v7, setup-dotnet v6, upload-artifact v7, download-artifact v8) — no Node.js 20 deprecation warnings

📦 Assets

Asset Description
linml-0.3.0-linux-x64.tar.gz Self-contained CLI binary (linux-x64) + helper scripts
linml-linux-x64.tar.gz Unversioned alias (latest)
SHA256SUMS.txt SHA-256 checksums for verification

🔗 Links


Upgrading

# Download and verify
curl -L -o linml-0.3.0-linux-x64.tar.gz https://github.com/trackdubllc/LinML/releases/download/v0.3.0/linml-0.3.0-linux-x64.tar.gz
sha256sum -c SHA256SUMS.txt  # verify

# Extract and run
tar -xzf linml-0.3.0-linux-x64.tar.gz
./linml --help

🙏 Contributors

@tonythethompson (all changes this release)