Esempio n. 1
0
 def check_type(*args):
     if not check_type.__warning_sent__:
         from ppdet.utils.cli import ColorTTY
         color_tty = ColorTTY()
         message = "typeguard is not installed," \
             + "type checking is not available"
         print(color_tty.yellow(message))
         check_type.__warning_sent__ = True
Esempio n. 2
0
 def doc_parse(*args):
     if not doc_parse.__warning_sent__:
         from ppdet.utils.cli import ColorTTY
         color_tty = ColorTTY()
         message = "docstring_parser is not installed, " \
             + "argument description is not available"
         print(color_tty.yellow(message))
         doc_parse.__warning_sent__ = True
Esempio n. 3
0
                     "\t1. run static model under PaddleDetection/static "
                     "directory\n"
                     "\t2. run 'pip uninstall ppdet' to uninstall ppdet "
                     "dynamic version firstly.".format(e))
        sys.exit(-1)
    else:
        raise e

color_tty = ColorTTY()

try:
    from docstring_parser import parse as doc_parse
except Exception:
    message = "docstring_parser is not installed, " \
        + "argument description is not available"
    print(color_tty.yellow(message))

try:
    from typeguard import check_type
except Exception:
    message = "typeguard is not installed," \
        + "type checking is not available"
    print(color_tty.yellow(message))

MISC_CONFIG = {
    "architecture": "<value>",
    "max_iters": "<value>",
    "train_feed": "<value>",
    "eval_feed": "<value>",
    "test_feed": "<value>",
    "pretrain_weights": "<value>",