Simplified APIs for onnxruntime
Project description
onnxruntime-easy
Simplified APIs for onnxruntime
Usage
import onnxruntime_easy as ort_easy
import numpy as np
import ml_dtypes
# Simple `load` method that handles setting up ONNX Runtime inference session
# All session options discoverable in the load function.
model = ort_easy.load("model.onnx", device="cpu") # You can control the providers if the default is not what you need
# Supports all ONNX dtypes via ml_dtypes or dlpack
input = ort_easy.ort_value(np.random.rand(1, 3, 299, 299).astype(ml_dtypes.bfloat16))
output = model(input)
# Works with any ndarray that implements the __array__ interface
# Or automatically share data on device (like cuda) with dlpack
import torch
model = ort_easy.load("model.onnx", device="cuda")
input_tensor = ort_easy.ort_value(torch.rand(1, 3, 299, 299, device="cuda"))
output = model(input_tensor)
# Use a context manager to control the outputs you get
with model.set_outputs("output1"):
output1 = model(input_tensor)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file onnxruntime_easy-0.1.0.tar.gz.
File metadata
- Download URL: onnxruntime_easy-0.1.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef4ece8192f8c886475c1991723e82c6eaaf6f2de30c3fb680d80f4ca596d9fe
|
|
| MD5 |
4617d17eb06eefbc59bb517b73aaae5e
|
|
| BLAKE2b-256 |
965d8423c2fc67e6dca889e5681c5f09b0a52a2423b053fdb29831594ab62419
|
Provenance
The following attestation bundles were made for onnxruntime_easy-0.1.0.tar.gz:
Publisher:
main.yml on justinchuby/onnxruntime-easy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
onnxruntime_easy-0.1.0.tar.gz -
Subject digest:
ef4ece8192f8c886475c1991723e82c6eaaf6f2de30c3fb680d80f4ca596d9fe - Sigstore transparency entry: 990947039
- Sigstore integration time:
-
Permalink:
justinchuby/onnxruntime-easy@cb908a66d24fe0ec6e69a0ffe769810055d2c8e6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/justinchuby
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@cb908a66d24fe0ec6e69a0ffe769810055d2c8e6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file onnxruntime_easy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: onnxruntime_easy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20fc6b1bc3493692abce4993c73dcc53c0282d9bf872ead42580d4685ea23d3e
|
|
| MD5 |
d80fceaf64c44bf737ab01962f99b278
|
|
| BLAKE2b-256 |
1a398e32f36cd227e0ff45ce6b9f2c8312425fa7d71e2d81730167ea2e4cb5ad
|
Provenance
The following attestation bundles were made for onnxruntime_easy-0.1.0-py3-none-any.whl:
Publisher:
main.yml on justinchuby/onnxruntime-easy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
onnxruntime_easy-0.1.0-py3-none-any.whl -
Subject digest:
20fc6b1bc3493692abce4993c73dcc53c0282d9bf872ead42580d4685ea23d3e - Sigstore transparency entry: 990947045
- Sigstore integration time:
-
Permalink:
justinchuby/onnxruntime-easy@cb908a66d24fe0ec6e69a0ffe769810055d2c8e6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/justinchuby
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@cb908a66d24fe0ec6e69a0ffe769810055d2c8e6 -
Trigger Event:
push
-
Statement type: