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

Call log callbacks before abort #930

Open
thewh1teagle opened this issue Aug 25, 2024 · 0 comments
Open

Call log callbacks before abort #930

thewh1teagle opened this issue Aug 25, 2024 · 0 comments

Comments

@thewh1teagle
Copy link
Contributor

I’m using ggml in Rust through bindings that call whisper.cpp, which in turn uses ggml. I noticed that whisper.cpp synchronizes ggml from this repository, so I thought it would be useful to report an issue here.

Currently, when an error occurs with ggml, it prints to stderr and then calls abort(). This approach makes it difficult to catch errors in production logs. The only workaround is to instruct users to run the program from a terminal in Windows and manually extract stderr output.

I have a mechanism in place that collects logs using a callback registered with whisper.cpp. However, the ggml abort function does not invoke this log callback before aborting.

Could you please modify the abort function to call the log callback before aborting? You can find the relevant code here. Additionally, abort() causes a complete crash of the program. It might be better to handle errors more gracefully, perhaps by implementing an error callback mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant