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

[Question] How to stop warning log #270

Open
tuannguyen90 opened this issue Aug 29, 2023 · 8 comments
Open

[Question] How to stop warning log #270

tuannguyen90 opened this issue Aug 29, 2023 · 8 comments
Labels
question Further information is requested

Comments

@tuannguyen90
Copy link

I am using NodeJS to serve a translation model.
There are so many warning log when translation processing. How to stop this?
2023-08-29 23:04:32.061 node[3167:31841] 2023-08-29 23:04:32.061977 [W:onnxruntime:, graph.cc:3490 CleanUnusedInitializersAndNodeArgs] Removing initializer '/model/decoder/layers.2/encoder_attn_layer_norm/Constant_output_0'. It is not used by any node and should be removed from the model. 2023-08-29 23:04:32.061 node[3167:31841] 2023-08-29 23:04:32.061987 [W:onnxruntime:, graph.cc:3490 CleanUnusedInitializersAndNodeArgs] Removing initializer '/model/decoder/layers.0/encoder_attn_layer_norm/Constant_output_0'. It is not used by any node and should be removed from the model. 2023-08-29 23:04:32.062 node[3167:31841] 2023-08-29 23:04:32.061997 [W:onnxruntime:, graph.cc:3490 CleanUnusedInitializersAndNodeArgs] Removing initializer '/model/decoder/layers.4/self_attn_layer_norm/Constant_1_output_0'. It is not used by any node and should be removed from the model.

@tuannguyen90 tuannguyen90 added the question Further information is requested label Aug 29, 2023
@orodrigogo
Copy link

Same problem. 😢

@xenova
Copy link
Collaborator

xenova commented Aug 31, 2023

Sure, I can update the default log level for onnxruntime to be "ERROR", meaning it won't show those warnings. I'll also add an option to set the log level back to the default.

@orodrigogo
Copy link

Sure, I can update the default log level for onnxruntime to be "ERROR", meaning it won't show those warnings. I'll also add an option to set the log level back to the default.

It will help. Thank you very much!

@xenova
Copy link
Collaborator

xenova commented Aug 31, 2023

Been looking into this a bit and I believe I found a bug in onnxruntime when creating the session from a buffer (instead of using the path): microsoft/onnxruntime#17377. Will keep you updated.

@calumk
Copy link

calumk commented Dec 4, 2023

Any update on this?

@gokaybiz
Copy link

microsoft/onnxruntime#17377 (comment)
but current version of transformers.js still using old release of onnx-runtime...

@innoware11
Copy link

In the worker before process or loading the model:
const originalWarn = console.warn;
console.warn = function() {};
After loading the model or process:
console.warn = originalWarn;

@dspasyuk
Copy link

dspasyuk commented Aug 25, 2024

Was this ever solved?

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

No branches or pull requests

7 participants