-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathworker_config.py
More file actions
50 lines (47 loc) · 1.55 KB
/
worker_config.py
File metadata and controls
50 lines (47 loc) · 1.55 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
41
42
43
44
45
46
47
48
49
50
# Worker-specific mindfile parts and worker types.
# This is the "single source of truth" for per-worker configuration.
from config import WORKERS_OBLIGATORY_PARTS
WORKER_SPECIFIC_PARTS = {
"quality_checks_worker": {
"mindfile_parts": [],
"type": "meta",
},
"integration_worker": {
"mindfile_parts": [],
"mindfile_parts_optional": ["internal_assets:this_architecture_description"],
"type": "meta",
},
"style_worker": {
"mindfile_parts": [],
"mindfile_parts_optional": ["dialogs", "interviews_etc", "style_samples"],
"type": "meta",
},
"doorman_worker": {
"mindfile_parts": [],
"type": "meta",
},
"data_worker": {
"mindfile_parts": [],
"mindfile_parts_optional": [
"structured_memories",
"dialogs",
"consumed_media_list",
"interviews_etc",
"writings_non_fiction",
"dreams",
"writings_fiction",
"structured_self_facts_leftover",
],
"type": "data",
},
}
# Dynamically build the final WORKERS_CONFIG.
# This allows for easy addition of new workers and obligatory sources
# without duplicating the obligatory sources for each worker.
WORKERS_CONFIG = {}
for worker_name, specs in WORKER_SPECIFIC_PARTS.items():
WORKERS_CONFIG[worker_name] = {
"mindfile_parts": WORKERS_OBLIGATORY_PARTS + specs.get("mindfile_parts", []),
"mindfile_parts_optional": specs.get("mindfile_parts_optional", []),
"type": specs["type"],
}