Option to Supress ONNX warnnings #77494
Labels
module: onnx
Related to torch.onnx
onnx-triaged
triaged by ONNX team
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃悰 Describe the bug
When exporting ONNX, there can be a bunch of warnings that
warning.simplefilter
can not filter. After some digging, I found such messages are directly from the C++ code base viastd::cerr
.pytorch/torch/csrc/jit/passes/onnx/shape_type_inference.cpp
Line 1911 in 1dd7336
I don't think such behaviors are good as libraries should not print arbitrary stuffs w/o an option to close it. So can we simply use
TORCH_WARN
:pytorch/c10/cuda/CUDAFunctions.cpp
Line 109 in 2793cf8
or something similar?
Related issue: ultralytics/yolov5#6401
cc: @BowenBao @garymm
Versions
PyTorch version: 1.11.0+cu102
The text was updated successfully, but these errors were encountered: