From 1b2618c0f7ef0605e7efd69b078017e659aed3fe Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sun, 22 Jan 2023 15:45:09 -0600 Subject: [PATCH] lint(api): suppress some known warnings during model conversion (#75) --- api/onnx_web/convert.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/onnx_web/convert.py b/api/onnx_web/convert.py index 4060fda6..25c5eb5c 100644 --- a/api/onnx_web/convert.py +++ b/api/onnx_web/convert.py @@ -11,6 +11,11 @@ from torch.onnx import export from typing import Dict, List, Tuple, Union import torch +import warnings + +# suppress common but harmless warnings, https://github.com/ssube/onnx-web/issues/75 +warnings.filterwarnings('ignore', '.*The shape inference of prim::Constant type is missing.*') +warnings.filterwarnings('ignore', '.*Only steps=1 can be constant folded.*') Models = Dict[str, List[Tuple[str, str, Union[int, None]]]]