-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlabeling_tester.py
More file actions
36 lines (29 loc) · 1.31 KB
/
labeling_tester.py
File metadata and controls
36 lines (29 loc) · 1.31 KB
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
29
30
31
32
33
34
35
36
import os
import sys
import warnings
warnings.filterwarnings("ignore")
from labeling import Labeler
def main(dataset, mode, model, heuristic_mode=None):
args = {
'dataset': f'{dataset}', \
'dataset_LF_saved_path': f'/hdd1/Alchemist_Data/{dataset}', \
'exp_result_saved_path': f'/home/{os.getlogin()}/RAGCODE/exp_log/{dataset}', \
'mode': f'{mode}', \
'codellm': f'{model}', \
'llm': f'{model}', \
'prior_type': f'{heuristic_mode}',
'LF_saving_exact_dir': f'/hdd1/Alchemist_Data/{dataset}/{mode}/{model}/{heuristic_mode or ""}'
}
print("********************")
labeler = Labeler(args)
labeler.run()
if __name__ == "__main__":
# print("python3 labeling_tester.py [dataset name] [mode] [model] [heuristic type]")
# print("Mode Options: 'ScriptoriumWS', 'Alchemist-without-RAG', 'Alchemist-with-RAG'")
# print("Model Options: 'gpt-3.5-turbo', 'gpt-4', 'claude-2.1', 'claude-3-sonnet-20240229'")
# print("Heuristic Types: 'labeling heuristics, rules, and guidance', 'keywords', 'dataset and class description', '5 data examples for each class'")
print(sys.argv)
if sys.argv[2] == "ScriptoriumWS":
main(sys.argv[1], sys.argv[2], sys.argv[3])
else:
main(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4])