Skip to content

Commit

Permalink
[Deployment] Add deprecation message for deploy tool (open-mmlab#1483)
Browse files Browse the repository at this point in the history
* master

* master 0721

* add README

* 1231 bump_version

* 0207 slowfast steplr

* 0207

* add deploy msg
  • Loading branch information
gengenkai authored Mar 1, 2022
1 parent 3860a70 commit 3f3ad9c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tools/deployment/pytorch2onnx.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import warnings

import mmcv
import numpy as np
Expand Down Expand Up @@ -168,3 +169,15 @@ def parse_args():
show=args.show,
output_file=args.output_file,
verify=args.verify)

# 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)

0 comments on commit 3f3ad9c

Please sign in to comment.