说明
“代码片段”系列文章并非对相关知识的总结,而是为代码编写提供快速上手的模板,即通过复制粘贴代码再经过简单的修改以快速完成预期功能。
代码片段
import argparse
LOG = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG, format='%(levelname)s:%(message)s')
ARG_PARSER = argparse.ArgumentParser(description="Generate benchmark CSV")
ARG_PARSER.add_argument(
'--test_dir',
dest='test_dir',
action='store',
help='The test raw ouput directory of the test samples.',
default=None,
required=True)
ARG_PARSER.add_argument(
'--base_dir',
dest='base_dir',
action='store',
help='The test raw ouput directory of the base samples.',
default=None,
required=True)
ARGS = ARG_PARSER.parse_args()
print(ARGS.test_dir)
print(ARGS.base_dir)