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

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

Closed
sroussey opened this issue Jan 22, 2024 · 3 comments
Closed

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

sroussey opened this issue Jan 22, 2024 · 3 comments
Assignees
Labels
feature request request for unsupported feature or enhancement platform:web issues related to ONNX Runtime web; typically submitted using template

Comments

@sroussey
Copy link
Contributor

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 sroussey added the platform:web issues related to ONNX Runtime web; typically submitted using template label Jan 22, 2024
@fs-eire
Copy link
Contributor

fs-eire commented Jan 30, 2024

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 fs-eire changed the title [Web] [Node] Setting env.logLevel is not doing anything [Node.js binding] Setting env.logLevel is not doing anything Jan 30, 2024
@fs-eire fs-eire self-assigned this Feb 23, 2024
@fs-eire fs-eire added the feature request request for unsupported feature or enhancement label Feb 23, 2024
@prathikr prathikr self-assigned this Aug 21, 2024
@sroussey
Copy link
Contributor Author

I worked around it by adding it to Transformer.js (my fork anyway) a long time ago, and passing that through via the session.

@prathikr
Copy link
Contributor

prathikr commented Oct 3, 2024

Fixed in

export const initOrt = (): void => {

@prathikr prathikr closed this as completed Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request request for unsupported feature or enhancement platform:web issues related to ONNX Runtime web; typically submitted using template
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants