-
Notifications
You must be signed in to change notification settings - Fork 23
/
main.py
28 lines (21 loc) · 917 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
26
27
28
from prompt_systematic_review import collect_papers
from prompt_systematic_review import config_data
config_data.DataFolderPath = "./data"
config_data.DotenvPath = "./.env"
### IF RUNNING EXPERIMENTS MULTIPLE TIMES, PLEASE SET
### hasDownloadedPapers TO True IN config_data.py or uncomment the following line
### config_data.hasDownloadedPapers = True
if not config_data.hasDownloadedPapers:
collect_papers.collect()
config_data.hasDownloadedPapers = True
from prompt_systematic_review import experiments
import os
os.makedirs(config_data.DataFolderPath + os.sep + "experiments_output", exist_ok=True)
print("Running experiments...")
for experiment in experiments.experiments:
try:
experiment.run()
except Exception as e:
print(f"Error running experiment {experiment.__name__}: {e}")
continue
print("Experiments completed. See data/experiments_output for output files")