Commit 022a738
Seed all random number generators in XAI chapter for reproducibility
The PyTorch/exmol section had no random seeding, causing variance in
model accuracy, counterfactuals, and other outputs across runs. Added
numpy, torch, and Python random seeds, random_state to train_test_split,
and nproc=1 to mordred to avoid multiprocessing non-determinism.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 4fe84ee commit 022a738
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1069 | 1069 | | |
1070 | 1070 | | |
1071 | 1071 | | |
| 1072 | + | |
1072 | 1073 | | |
1073 | 1074 | | |
1074 | 1075 | | |
| |||
1122 | 1123 | | |
1123 | 1124 | | |
1124 | 1125 | | |
1125 | | - | |
| 1126 | + | |
1126 | 1127 | | |
1127 | 1128 | | |
1128 | 1129 | | |
| |||
1151 | 1152 | | |
1152 | 1153 | | |
1153 | 1154 | | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
1154 | 1158 | | |
1155 | 1159 | | |
1156 | | - | |
| 1160 | + | |
1157 | 1161 | | |
1158 | 1162 | | |
1159 | 1163 | | |
| |||
1237 | 1241 | | |
1238 | 1242 | | |
1239 | 1243 | | |
1240 | | - | |
| 1244 | + | |
1241 | 1245 | | |
1242 | 1246 | | |
1243 | 1247 | | |
| |||
1268 | 1272 | | |
1269 | 1273 | | |
1270 | 1274 | | |
| 1275 | + | |
| 1276 | + | |
1271 | 1277 | | |
1272 | 1278 | | |
1273 | 1279 | | |
| |||
1388 | 1394 | | |
1389 | 1395 | | |
1390 | 1396 | | |
1391 | | - | |
| 1397 | + | |
1392 | 1398 | | |
1393 | 1399 | | |
1394 | 1400 | | |
| |||
0 commit comments