From 4874b56f62c08587e98fe43d7ed3b04aa32d5f41 Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Thu, 15 Apr 2021 20:28:16 +0800 Subject: [PATCH] fix ignore warning (#2648) --- tools/eval.py | 4 ++++ tools/export_model.py | 4 ++++ tools/infer.py | 3 +++ tools/train.py | 3 +++ 4 files changed, 14 insertions(+) diff --git a/tools/eval.py b/tools/eval.py index 16f6acee8..65080e90e 100755 --- a/tools/eval.py +++ b/tools/eval.py @@ -22,6 +22,10 @@ parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2))) if parent_path not in sys.path: sys.path.append(parent_path) +# ignore warning log +import warnings +warnings.filterwarnings('ignore') + import paddle from ppdet.core.workspace import load_config, merge_config diff --git a/tools/export_model.py b/tools/export_model.py index 6665d2bf9..8cf3885c8 100644 --- a/tools/export_model.py +++ b/tools/export_model.py @@ -21,6 +21,10 @@ parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2))) if parent_path not in sys.path: sys.path.append(parent_path) +# ignore warning log +import warnings +warnings.filterwarnings('ignore') + import paddle from ppdet.core.workspace import load_config, merge_config diff --git a/tools/infer.py b/tools/infer.py index a73e14a67..4b38225ff 100755 --- a/tools/infer.py +++ b/tools/infer.py @@ -21,6 +21,9 @@ parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2))) if parent_path not in sys.path: sys.path.append(parent_path) +# ignore warning log +import warnings +warnings.filterwarnings('ignore') import glob import paddle diff --git a/tools/train.py b/tools/train.py index 675163b4e..3a7d4f69f 100755 --- a/tools/train.py +++ b/tools/train.py @@ -24,6 +24,9 @@ if parent_path not in sys.path: import random import numpy as np +# ignore warning log +import warnings +warnings.filterwarnings('ignore') import paddle -- GitLab