Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Performance] Difference in the ONNX model loading times in C# vs Python #22528

Closed
BhSinghal opened this issue Oct 21, 2024 · 0 comments
Closed
Labels
api:CSharp issues related to the C# API performance issues related to performance regressions

Comments

@BhSinghal
Copy link

BhSinghal commented Oct 21, 2024

Describe the issue

We create models in Azure ML pipelines and convert them into ONNX format.
Recently, we increased the number of estimators of an ensemble model [LGBMClassifier] to 300 which increased the file size to ~200MB.
The older model had 33 estimators, and the file size was around ~2MB.

When we try to create an InferenceSession with this new bigger file using C# we are able to do so in ~10 min while creating an InferenceSession with the same file via Python takes ~15 seconds. [onxx_results.png in the OneDrive link shared on email.]

We want to understand this difference in performance.

We have forwarded the link of OneDrive folder with the code and files as a separate email with subject : [Performance] Difference in the ONNX model loading times in C# vs Python

To reproduce

The OneDrive folder as mentioned in the email sent with subject : [Performance] Difference in the ONNX model loading times in C# vs Python contains the README.md.txt which outlines all the steps to reproduce the issue.

The "old" folder contains ~2MB model with 33 estimators.
The "new" folder contains ~200MB model with 300 estimators.

Please let us know if any other information is needed.

Urgency

No response

Platform

Windows

OS Version

Microsoft Windows 11 Enterprise, 10.0.26100 Build 26100, Surface Laptop 5, 12th Gen Intel(R) Core(TM) i7-1265U, 2700 Mhz, 10 Core(s), 12 Logical Processor(s)

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

ONNX 1.18

ONNX Runtime API

C#

Architecture

X64

Execution Provider

Default CPU

Execution Provider Library Version

No response

Model File

No response

Is this a quantized model?

No

@BhSinghal BhSinghal added the performance issues related to performance regressions label Oct 21, 2024
@github-actions github-actions bot added the api:CSharp issues related to the C# API label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:CSharp issues related to the C# API performance issues related to performance regressions
Projects
None yet
Development

No branches or pull requests

2 participants