---
title: 添加额外参数
description: ann-benchmarks源码中在输出结果时均默认采用非batch模式进行结果输出，可以修改源码为查看命令增加额外参数--outbatch，修改后使用该选项将使用batch模式输出结果。
url: "https://www.hikunpeng.com/document/detail/zh/kunpengdbs/testguide/tstg/kunpeng_ann_marks_015.html"
---

# 添加额外参数

ann-benchmarks源码中在输出结果时均默认采用非batch模式进行结果输出，可以修改源码为查看命令增加额外参数--outbatch，修改后使用该选项将使用batch模式输出结果。

1. 打开data_export.py文件。
  1 vim /data/ann-benchmarks-main/data_export.py

2. 在data_export.py文件第12行增加参数outbatch。
  1 parser.add_argument("--outbatch",action="store_true",help="output using batch mode")

3. 修改data_export.py文件第19行和20行的方法进行传参。
  1 2 if len(list(load_all_results(dataset_name,None, args.outbatch))) > 0: results = load_all_results(dataset_name,None, args.outbatch)
