forked from microsoft/rag-experiment-accelerator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path02_qa_generation.py
More file actions
20 lines (15 loc) · 764 Bytes
/
02_qa_generation.py
File metadata and controls
20 lines (15 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import argparse
from rag_experiment_accelerator.run.qa_generation import run
from rag_experiment_accelerator.config.config import Config
from rag_experiment_accelerator.config.environment import Environment
from rag_experiment_accelerator.config.paths import get_all_file_paths
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"--config_path", type=str, help="input: path to the config file"
)
parser.add_argument("--data_dir", type=str, help="input: path to the input data")
args, _ = parser.parse_known_args()
environment = Environment.from_env_or_keyvault()
config = Config(environment, args.config_path, args.data_dir)
run(environment, config, get_all_file_paths(config.data_dir))