-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHOW_TO_RUN_MMAF.txt
More file actions
230 lines (135 loc) · 3.9 KB
/
Copy pathHOW_TO_RUN_MMAF.txt
File metadata and controls
230 lines (135 loc) · 3.9 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
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# How to Run MMAF Experiments
## 1. Prepare the project
Put the project folder in Google Colab/Drive, VS Code, or your local machine.
Your project should look like this:
MMAF_Faiz/
code/
config/
data/
results/
output/
requirements.txt
## 2. Add datasets
Put all dataset CSV files inside the data/ folder using lowercase names:
data/tox21.csv
data/bace.csv
data/bbbp.csv
data/hiv.csv
data/clintox.csv
data/sider.csv
If your files are uppercase, rename them:
mv data/BACE.csv data/bace.csv
mv data/BBBP.csv data/bbbp.csv
mv data/HIV.csv data/hiv.csv
## 3. Install requirements
Run from the project root:
pip install -r requirements.txt
## 4. Check setup
Before training, check that the required dataset files exist:
python code/check_setup.py
In Google Colab/Jupyter, use:
!python code/check_setup.py
# Dataset Types and Commands
## A. Tox21
python code/train_tox21.py --config config/tox21.yaml
In Colab:
!python code/train_tox21.py --config config/tox21.yaml
## B. Binary classification datasets
These datasets use the binary pipeline:
- BACE
- BBBP
- HIV
### BACE
Random split:
python code/train_bace.py --split random
Scaffold split:
python code/train_bace.py --split scaffold
Direct pipeline commands:
python code/pipelines/binary_random.py --dataset bace --data-dir data --output-dir results
python code/pipelines/binary_scaffold.py --dataset bace --data-dir data --output-dir results
### BBBP
Random split:
python code/train_bbbp.py --split random
Scaffold split:
python code/train_bbbp.py --split scaffold
Direct pipeline commands:
python code/pipelines/binary_random.py --dataset bbbp --data-dir data --output-dir results
python code/pipelines/binary_scaffold.py --dataset bbbp --data-dir data --output-dir results
### HIV
Random split:
python code/train_hiv.py --split random
Scaffold split:
python code/train_hiv.py --split scaffold
Direct pipeline commands:
python code/pipelines/binary_random.py --dataset hiv --data-dir data --output-dir results
python code/pipelines/binary_scaffold.py --dataset hiv --data-dir data --output-dir results
## C. Multi-output / multi-label datasets
These datasets use the multi pipeline:
- ClinTox
- SIDER
ClinTox has two output labels:
- FDA_APPROVED
- CT_TOX
SIDER has multiple side-effect labels.
### ClinTox
Random split:
python code/train_clintox.py --split random
Scaffold split:
python code/train_clintox.py --split scaffold
Direct pipeline commands:
python code/pipelines/multi_random.py --dataset clintox --data-dir data --output-dir results
python code/pipelines/multi_scaffold.py --dataset clintox --data-dir data --output-dir results
### SIDER
Random split:
python code/train_sider.py --split random
Scaffold split:
python code/train_sider.py --split scaffold
Direct pipeline commands:
python code/pipelines/multi_random.py --dataset sider --data-dir data --output-dir results
python code/pipelines/multi_scaffold.py --dataset sider --data-dir data --output-dir results
# Quick Test
Before running full experiments, test with a quick run:
python code/train.py --dataset bbbp --split random --quick
or:
python code/run_all.py --quick
In Colab:
!python code/run_all.py --quick
# Run All Experiments
To run all datasets and splits:
python code/run_all.py
In Colab:
!python code/run_all.py
# Important Notes
Use lowercase dataset names only:
bace
bbbp
hiv
clintox
sider
Do not use uppercase names such as:
BACE
BBBP
HIV
CLINTOX
SIDER
For example, this is correct:
python code/pipelines/multi_random.py --dataset clintox --data-dir data --output-dir results
This is wrong:
python code/pipelines/multi_random.py --dataset CLINTOX --data-dir data --output-dir results
# Results
Results are saved under:
results/
output/
output/checkpoints/
output/splits/
For example:
results/clintox_random/
results/sider_random/
results/bbbp_random/
results/hiv_scaffold/
To check saved results:
ls results
ls output
In Colab:
!ls results
!ls output