Skip to main content

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
model = ort_easy.load("model.onnx", device="cpu")
# Supports all ONNX dtypes via ml_dtypes or dlpack
input = np.random.rand(1, 3, 299, 299).astype(ml_dtypes.bfloat16)
output = model(input)

# Works with torch tensors and any ndarray that implements the __array__ interface
import torch
input_tensor = torch.rand(1, 3, 299, 299)
output = model(input)

with model.set_outputs("output1"):
    output1 = model(input)

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

onnxruntime_easy-0.0.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

onnxruntime_easy-0.0.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file onnxruntime_easy-0.0.2.tar.gz.

File metadata

  • Download URL: onnxruntime_easy-0.0.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for onnxruntime_easy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 44237a5076b435b2aef4a0452bc38c1cb3dea2a796c8e163410e6e85e9d27f06
MD5 12bf971854f38c704b9264b6d4ca8334
BLAKE2b-256 83868a6f7185f71ee6f866e593212bd7803eb9dc9eb6fdfe2ef048615c360024

See more details on using hashes here.

Provenance

The following attestation bundles were made for onnxruntime_easy-0.0.2.tar.gz:

Publisher: main.yml on justinchuby/onnxruntime-easy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file onnxruntime_easy-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for onnxruntime_easy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2cb4f724a62f609df60bca98b1c7a7d16b739140b5869b2a5a4cab2c52ced5a7
MD5 e495282f6356a1b6587f3ae07d373e5f
BLAKE2b-256 191b30f4830a8b712ec884f60d89a430b3da15437a62d71c533b5ff216597f5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for onnxruntime_easy-0.0.2-py3-none-any.whl:

Publisher: main.yml on justinchuby/onnxruntime-easy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page