-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
40 lines (30 loc) · 1.95 KB
/
config.py
File metadata and controls
40 lines (30 loc) · 1.95 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
37
38
39
40
import os
APPROACH = None # global flag
def configure_paths(approach):
global DATAPATH, LOCALPARENTSTORAGE, CHROMAPATH, COLLECTION_NAME, APPROACH, CHUNKS_IN_JSON, EVALUATION_RESULT, EVALUATION_RESULT_CSV, GOLDENS_JSON, GOLDENS_CSV
APPROACH = approach
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
if approach == "03":
DATAPATH = os.path.join(BASE_DIR, "data/child_parents_weisungen/")
LOCALPARENTSTORAGE = os.path.join(BASE_DIR, "local_datastore/parent_storage/")
CHROMAPATH = os.path.join(BASE_DIR, "chroma_db")
COLLECTION_NAME = "parent_weisungen"
CHUNKS_IN_JSON = os.path.join(BASE_DIR,"loacal_datastore/sparse_datastore/chunk.json")
EVALUATION_RESULT = os.path.join(BASE_DIR, "tests", "results", "parent")
EVALUATION_RESULT_CSV = os.path.join(BASE_DIR,"tests/results/results_in_csv/parent_evaluation_results.csv")
elif approach == "01":
DATAPATH = os.path.join(BASE_DIR, "data/weisungen/")
CHROMAPATH = os.path.join(BASE_DIR, "chroma_db")
COLLECTION_NAME = "alle_weisungen"
EVALUATION_RESULT = os.path.join(BASE_DIR, "tests", "results", "standard")
EVALUATION_RESULT_CSV = os.path.join(BASE_DIR,"tests/results/results_in_csv/standard_evaluation_results.csv")
elif approach == "02":
DATAPATH = os.path.join(BASE_DIR, "data/weisungen/")
CHROMAPATH = os.path.join(BASE_DIR, "chroma_db")
COLLECTION_NAME = "alle_weisungen"
CHUNKS_IN_JSON = os.path.join(BASE_DIR,"local_datastore/sparse_datastore/multiquery_chunk.json")
EVALUATION_RESULT = os.path.join(BASE_DIR, "tests", "results", "multiquery")
EVALUATION_RESULT_CSV = os.path.join(BASE_DIR,"tests/results/results_in_csv/multiquery_evaluation_results.csv")
elif approach == "goldens":
GOLDENS_JSON = os.path.join(BASE_DIR, "eval_dataset", "test_data")
GOLDENS_CSV = os.path.join(BASE_DIR, "eval_dataset/test_data/dataset.csv")