-
Notifications
You must be signed in to change notification settings - Fork 3k
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
How can I debug a reproducible error? #20792
Comments
You have a model with dynamic dimensions. This means that dimension can vary, typically due to the input shape. In this case Reshape takes The error message indicates that at least one dimension has a value of zero, but the attribute To debug this, you have a couple of options. 1) Visually trace the data flow (it is actually possible, but not always) and attempt to compute where the zero is coming from and whether it should be there or should |
@yuslepukhin Thanks for the feedback, the model is a https://github.com/rhasspy/piper model that was probably converted by their converter from a ckpt to onnx model, so you mean that a problem could be in the export script? What I found strange is that with onnxruntime v1.16 I didn't had these errors This is the code I suppose was used to convert that model: https://github.com/rhasspy/piper/blob/master/src/python/piper_train/export_onnx.py About the debugging, can you visually trace interactively? because there are tons of nodes, would be nice to be able to have a way to put a breakpoint and then inspecting the call stack :) |
It may be a converter issue, may be the original model issue. You insert some code here: https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/framework/sequential_executor.cc#L452 To interrogate the kernel inputs/outputs and print shapes. |
Thanks, unluckily I'm using the C# version of onnxruntime so I can't tap into the cc |
There are no different versions of onnxruntime. There is only one. C# along with different languages are just interfaces to consume onnxruntime. |
yes I mean I'm consuming C# nuget packages that are wrappers around native onnxruntime so I can't put a breakpoint on .cc code, or at least I think so, I know nuget can include symbols but I thought they were only on .net code, would be nice to be able to put breakpoints on .cc too. Where can i found (updated) technical documentation about onnxruntime? |
This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details. |
Describe the issue
I'm quite new to onnxruntime, I'm using it in C# and my first use is TTS by generating phonemes with espeak ng, and then generate audio with a VITS voice taken from rhasspy/piper/ converting the phonemes in the voice phonemeIds.
It's working most of the time but sometimes I have some errors from the model
I'm using onnxruntime 18.0 and my problem are both with CPU and GPU but I'd like to understand how to debug and fix these problems, so let's focus on GPU.
I've find a specific input that generates an error most of the time.
The error is:
The first run works, next ones gave the error above (but only with specific inputs)
I managed to isolate the phonemes (and then the input) that generate this but I don't know how to fix and I'm clueless.
To reproduce
I've seen around people talking about Netro, so I used it on the model and the offending node is this
The model is this https://huggingface.co/rhasspy/piper-voices/tree/main/it/it_IT/riccardo/x_low
The input that generate the error is
I initialize the InferenceSession this way:
and I leave the _session alive, then whenever I need to generate speach, I call this code:
Is this code correct? I can't find proper updated and detailed documentation and I'm not into model generation/training, I'm very proficient in C# but quite new on the technical side of model developments
Urgency
I want to solve the problem, but the most important thing to me is understand "HOW" to debug these issues rather than having a cooked solution
Thanks
Platform
Windows
OS Version
Windows 11
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.18
ONNX Runtime API
C#
Architecture
X64
Execution Provider
Default CPU, CUDA
Execution Provider Library Version
The text was updated successfully, but these errors were encountered: