Skip to content

[DX] Improve inference example behavior on unsupported platforms #42

Description

@tazarov

Context\nIn examples/inference/main.go, defaultLibraryPath() returns an empty string for unknown platforms. This eventually bubbles into a less-direct initialization error when no explicit ONNXRUNTIME_LIB_PATH is set.\n\nReview context: https://github.com/amikos-tech/pure-onnx/pull/37#issuecomment-3916003463\n\n## Why\nThe example should fail fast with an actionable message for unsupported platforms instead of relying on downstream validation.\n\n## Proposed follow-up\n- When default path cannot be inferred, return a clear error message instructing users to set ONNXRUNTIME_LIB_PATH.\n- Optionally include runtime.GOOS in the message for debugging.\n- Add a small test (or helper-level test) for unsupported-platform fallback behavior if feasible.\n\n## Out of scope\nNo runtime/library loading behavior changes in ort; example UX only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions