-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdvc.yaml
166 lines (156 loc) · 4.67 KB
/
dvc.yaml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
vars:
- trials:
- name: hipattack
title: HIPATTACK
- name: poise
title: POISE1
- name: manage
title: MANAGE
- name: compass
title: COMPASS
- name: tips3
title: TIPS3
- name: hope3
title: HOPE-3
- name: rely
title: RE-LY
- output_directory: data
stages:
diff:
foreach: ${trials}
do:
cmd: >
poetry run python3 -m traq.preprocessing diff
--config_filename configs/${item.name}.toml
--output_directory ${output_directory}
deps:
- traq/preprocessing/diff.py
- configs/${item.name}.toml
- data/raw/${item.title}
outs:
- data/diffs/${item.name}
# summarize:
# foreach: ${trials}
# do:
# cmd: >
# poetry run python3 -m traq.preprocessing summarize
# --config_filename configs/${item.name}.toml
# --output_directory ${output_directory}
# deps:
# - traq/preprocessing/summarize.py
# - configs/${item.name}.toml
# - data/diffs/${item.name}
# outs:
# - data/summaries/${item.name}
derive_labels:
foreach: ${trials}
do:
cmd: >
poetry run python3 -m traq.preprocessing derive_labels
--config_filename configs/${item.name}.toml
--output_directory ${output_directory}
deps:
- traq/preprocessing/derive_labels.py
- configs/${item.name}.toml
- data/diffs/${item.name}
outs:
- data/derived/${item.name}
explode_pickles:
foreach: ${trials}
do:
cmd: >
poetry run python3 -m traq.services.explode_pickles
--input_directory data/derived/${item.name}
--output_filename data/exploded/${item.name}.pkl
deps:
- data/derived/${item.name}
- traq/utils.py
- traq/services/explode_pickles.py
outs:
- data/exploded/${item.name}.pkl
compute_meta_features:
foreach: ${trials}
do:
cmd: >
python3.7 -W ignore -m traq.services.generate_metafeatures
--input_filename data/exploded/${item.name}.pkl
--output_filename data/metafeatures/${item.name}.pkl
deps:
- data/exploded/${item.name}.pkl
- traq/services/generate_metafeatures.py
outs:
- data/metafeatures/${item.name}.pkl
compare_od_models:
foreach: ${trials}
do:
cmd: >
poetry run python3 -W ignore -m traq.compare_unsupervised
--input_directory data/derived/${item.name}
--output_filename output/comparisons/${item.name}.csv
deps:
- traq/compare_unsupervised.py
- traq/utils.py
- traq/evaluation.py
- traq/data/pickle.py
- traq/data/base.py
- traq/grid.py
- data/derived/${item.name}
outs:
- output/comparisons/${item.name}.csv
fit_metaod_models:
foreach: ${trials}
do:
cmd: >
PYTHONPATH=. python3.7 traq/services/train_metaod.py
--metafeatures_directory data/metafeatures
--performance_directory output/comparisons
--output_filename models/metaod/${item.name}.pkl
--exclude_from_training ${item.name}
deps:
- traq/services/train_metaod.py
- data/metafeatures
- output/comparisons
outs:
- models/metaod/${item.name}.pkl
comparison_viz:
cmd: >
mkdir -p output/viz &&
poetry run python3 -m traq.format_comparisons
--input_directory output/comparisons
--output_directory output/viz > output/viz/summary.txt
deps:
- traq/format_comparisons.py
- output/comparisons
outs:
- output/viz
compare_meta_models:
foreach: ${trials}
do:
cmd: >
poetry run python3 -W ignore -m traq.compare_selection
--input_directory data/derived/${item.name}
--output_filename output/meta_comparisons/${item.name}.csv
deps:
- traq/metaod_wrapper.py
- traq/compare_selection.py
- traq/utils.py
- traq/evaluation.py
- traq/data/pickle.py
- traq/data/base.py
- traq/grid.py
- data/derived/${item.name}
- data/metafeatures/${item.name}.pkl
- models/metaod/${item.name}.pkl
outs:
- output/meta_comparisons/${item.name}.csv
meta_comparison_viz:
cmd: >
mkdir -p output/meta_viz &&
poetry run python3 -m traq.format_comparisons
--input_directory output/meta_comparisons
--output_directory output/meta_viz > output/meta_viz/summary.txt
deps:
- traq/format_comparisons.py
- output/meta_comparisons
outs:
- output/meta_viz