onnxruntime icon indicating copy to clipboard operation
onnxruntime copied to clipboard

[Node.js binding] Setting env.logLevel is not doing anything

Open sroussey opened this issue 1 year ago • 2 comments

Describe the issue

I get a lot of log messages using the node version:

2024-01-21 21:04:28.733 bun[75276:28893261] 2024-01-21 21:04:28.731651 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/decoder/block.2/layer.2/DenseReluDense/act/Constant_3_output_0'. It is not used by any node and should be removed from the model.
2024-01-21 21:04:28.733 bun[75276:28893261] 2024-01-21 21:04:28.731661 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/decoder/block.16/layer.2/DenseReluDense/act/Constant_2_output_0'. It is not used by any node and should be removed from the model.
2024-01-21 21:04:28.733 bun[75276:28893261] 2024-01-21 21:04:28.731681 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/decoder/block.8/layer.2/DenseReluDense/act/Constant_3_output_0'. It is not used by any node and should be removed from the model.
2024-01-21 21:04:28.733 bun[75276:28893261] 2024-01-21 21:04:28.731695 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/decoder/block.1/layer.2/DenseReluDense/act/Constant_output_0'. It is not used by any node and should be removed from the model.
2024-01-21 21:04:28.733 bun[75276:28893261] 2024-01-21 21:04:28.731702 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/decoder/block.11/layer.2/DenseReluDense/act/Constant_3_output_0'. It is not used by any node and should be removed from the model.
2024-01-21 21:04:28.733 bun[75276:28893261] 2024-01-21 21:04:28.731711 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/decoder/block.0/layer.2/DenseReluDense/act/Constant_1_output_0'. It is not used by any node and should be removed from the model.
2024-01-21 21:04:28.733 bun[75276:28893261] 2024-01-21 21:04:28.731719 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/decoder/block.10/layer.2/DenseReluDense/act/Constant_1_output_0'. It is not used by any node and should be removed from the model.
2024-01-21 21:04:28.733 bun[75276:28893261] 2024-01-21 21:04:28.731730 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/decoder/block.3/layer.2/DenseReluDense/act/Constant_3_output_0'. It is not used by any node and should be removed from the model.
2024-01-21 21:04:28.733 bun[75276:28893261] 2024-01-21 21:04:28.731738 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/decoder/block.7/layer.2/DenseReluDense/act/Constant_3_output_0'. It is not used by any node and should be removed from the model.
2024-01-21 21:04:28.733 bun[75276:28893261] 2024-01-21 21:04:28.731757 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/decoder/block.0/layer.2/DenseReluDense/act/Constant_3_output_0'. It is not used by any node and should be removed from the model.
2024-01-21 21:04:28.733 bun[75276:28893261] 2024-01-21 21:04:28.731767 [W:onnxruntime:, graph.cc:3553 CleanUnusedInitializersAndNodeArgs] Removing initializer '/decoder/block.0/layer.2/DenseReluDense/act/Constant_4_output_0'. It is not used by any node and should be removed from the model.

I would like to quiet these, so I tried setting env.logLevel to "error" (or any change) and don't see any results.

I have a project that uses transformers.js that uses this project, and it doesn't not matter where I set it.

To reproduce

log_severity_level set in session params will work, but transformers.js does not have a good way to set it. It seems like the env.logLevel is meant to work though.

Urgency

NO

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.16.3

Execution Provider

Other / Unknown

sroussey avatar Jan 22 '24 17:01 sroussey

Thanks for the feedback. I think this env.logLevel works for onnxruntime-web but not for onnxruntime-node. Need a fix for this.

fs-eire avatar Jan 30 '24 00:01 fs-eire