diff --git a/tools/deploy_test.py b/tools/deploy_test.py index fedd645..eca5430 100644 --- a/tools/deploy_test.py +++ b/tools/deploy_test.py @@ -324,3 +324,15 @@ def main(): if __name__ == '__main__': main() + + # Following strings of text style are from colorama package + bright_style, reset_style = '\x1b[1m', '\x1b[0m' + red_text, blue_text = '\x1b[31m', '\x1b[34m' + white_background = '\x1b[107m' + + msg = white_background + bright_style + red_text + msg += 'DeprecationWarning: This tool will be deprecated in future. ' + msg += blue_text + 'Welcome to use the unified model deployment toolbox ' + msg += 'MMDeploy: https://github.com/open-mmlab/mmdeploy' + msg += reset_style + warnings.warn(msg) diff --git a/tools/onnx2tensorrt.py b/tools/onnx2tensorrt.py index f8a258f..0f60dce 100644 --- a/tools/onnx2tensorrt.py +++ b/tools/onnx2tensorrt.py @@ -2,6 +2,7 @@ import argparse import os import os.path as osp +import warnings from typing import Iterable, Optional, Union import matplotlib.pyplot as plt @@ -274,3 +275,15 @@ if __name__ == '__main__': dataset=args.dataset, workspace_size=args.workspace_size, verbose=args.verbose) + + # Following strings of text style are from colorama package + bright_style, reset_style = '\x1b[1m', '\x1b[0m' + red_text, blue_text = '\x1b[31m', '\x1b[34m' + white_background = '\x1b[107m' + + msg = white_background + bright_style + red_text + msg += 'DeprecationWarning: This tool will be deprecated in future. ' + msg += blue_text + 'Welcome to use the unified model deployment toolbox ' + msg += 'MMDeploy: https://github.com/open-mmlab/mmdeploy' + msg += reset_style + warnings.warn(msg) diff --git a/tools/pytorch2onnx.py b/tools/pytorch2onnx.py index 9de3404..060d187 100644 --- a/tools/pytorch2onnx.py +++ b/tools/pytorch2onnx.py @@ -1,5 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. import argparse +import warnings from functools import partial import mmcv @@ -390,3 +391,15 @@ if __name__ == '__main__': output_file=args.output_file, verify=args.verify, dynamic_export=args.dynamic_export) + + # Following strings of text style are from colorama package + bright_style, reset_style = '\x1b[1m', '\x1b[0m' + red_text, blue_text = '\x1b[31m', '\x1b[34m' + white_background = '\x1b[107m' + + msg = white_background + bright_style + red_text + msg += 'DeprecationWarning: This tool will be deprecated in future. ' + msg += blue_text + 'Welcome to use the unified model deployment toolbox ' + msg += 'MMDeploy: https://github.com/open-mmlab/mmdeploy' + msg += reset_style + warnings.warn(msg)