2020-10-12 13:34:42 +02:00
|
|
|
from retriever import benchmark_indexing, benchmark_querying
|
|
|
|
from reader import benchmark_reader
|
2020-10-15 18:12:17 +02:00
|
|
|
from utils import load_config
|
2020-10-12 13:34:42 +02:00
|
|
|
import argparse
|
|
|
|
|
2020-10-15 18:12:17 +02:00
|
|
|
|
2020-10-12 13:34:42 +02:00
|
|
|
parser = argparse.ArgumentParser()
|
|
|
|
|
|
|
|
parser.add_argument('--reader', default=False, action="store_true",
|
|
|
|
help='Perform Reader benchmarks')
|
|
|
|
parser.add_argument('--retriever_index', default=False, action="store_true",
|
|
|
|
help='Perform Retriever indexing benchmarks')
|
|
|
|
parser.add_argument('--retriever_query', default=False, action="store_true",
|
|
|
|
help='Perform Retriever querying benchmarks')
|
|
|
|
parser.add_argument('--ci', default=False, action="store_true",
|
|
|
|
help='Perform a smaller subset of benchmarks that are quicker to run')
|
2020-10-21 17:48:10 +02:00
|
|
|
parser.add_argument('--update_json', default=False, action="store_true",
|
|
|
|
help='Update the json file with the results of this run so that the website can be updated')
|
2020-11-18 18:28:17 +01:00
|
|
|
parser.add_argument('--save_markdown', default=False, action="store_true",
|
|
|
|
help='Update the json file with the results of this run so that the website can be updated')
|
2020-10-12 13:34:42 +02:00
|
|
|
args = parser.parse_args()
|
|
|
|
|
2020-12-02 16:59:42 +01:00
|
|
|
# load config
|
|
|
|
params, filenames = load_config(config_filename="config.json", ci=args.ci)
|
|
|
|
|
2020-10-12 13:34:42 +02:00
|
|
|
if args.retriever_index:
|
2020-11-18 18:28:17 +01:00
|
|
|
benchmark_indexing(**params, **filenames, ci=args.ci, update_json=args.update_json, save_markdown=args.save_markdown)
|
2020-10-12 13:34:42 +02:00
|
|
|
if args.retriever_query:
|
2020-11-18 18:28:17 +01:00
|
|
|
benchmark_querying(**params, **filenames, ci=args.ci, update_json=args.update_json, save_markdown=args.save_markdown)
|
2020-10-19 14:40:26 +02:00
|
|
|
if args.reader:
|
2020-11-18 18:28:17 +01:00
|
|
|
benchmark_reader(**params, **filenames, ci=args.ci, update_json=args.update_json, save_markdown=args.save_markdown)
|
2020-10-12 13:34:42 +02:00
|
|
|
|