forked from IAAR-Shanghai/CRUD_RAG
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
25 lines (21 loc) · 820 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from loguru import logger
from src.benchmark import config_parser
from src.benchmark.datasets import get_task_datasets
from src.benchmark.tasks import tasks_factory
from src.components.pipeline_factory import PipelineFactory
from src.evaluator.evaluator import BaseEvaluator
import logging
def main():
logging.basicConfig(level=logging.CRITICAL)
parser = config_parser.get_arg_parser()
args = parser.parse_args()
logger.info("Configurations: {}", args)
pipe = PipelineFactory.create_pipeline(args)
tasks = tasks_factory.get_task(args)
datasets = get_task_datasets(args.data_path, args.task)
logger.info("Evaluation started.")
evaluator = BaseEvaluator(args, pipe, tasks, datasets)
evaluator.run()
logger.info("Evaluation completed.")
if __name__ == "__main__":
main()