EricBoittier/openadnet

HTML

2

80 commits

updated Apr 12, 2026

See the code

README

openadnet

Code and baselines for PXR (pregnane X receptor) activity modeling on the OpenADMET / Hugging Face challenge data: RDKit fingerprints plus classical regressors, optional PyTorch Geometric graph models, HuggingFace encoder regressors, delta learning, ensembles, submission CSV helpers, uncertainty (including conformal-style tooling), and visualization (e.g. TMAP, plots in viz).

TopicWhere to start
Install & optional DL stackInstallation
Sklearn CV grid & cachingFingerprint grid, CV result cache
Full baseline leaderboardLatest baseline CV
PyG SMILES → graph → regressiondocs/pyg_gnn.md
Example PyG GNN CVPyG GNN (example run)
Challenge submission CSVsrc/submission.py, scripts/write_submission.py

Installation

From the repository root (Python ≥ 3.13):

pip install -e .

Optional extras (see pyproject.toml):

pip install -e ".[dl]"     # torch, transformers, torch-geometric — GNNs & HF regressors
pip install -e ".[hydra]"  # Hydra for experiment sweeps (e.g. `scripts/hydra_gnn_sweep.py`)

Training data are loaded via Hugging Face Hub on first use and cached locally; set HF_TOKEN for higher rate limits.

Repository layout (high level)

  • src/baseline.py, src/features_data.py, src/score_data.py — descriptor grid, CV loop, default baseline run.
  • src/models/ — GNNRegressor, HuggingFaceRegressor, ensembles, cv_dl for neural CV; src/models/data/graph.py builds PyG graphs from SMILES.
  • src/delta_learning.py — delta-learning helpers used with the baseline / DL stack.
  • src/submission.py — validate predictions and write challenge-shaped submission files.
  • src/uncertainty/ — uncertainty and related plotting utilities.
  • scripts/ — CV drivers (cv_gnn_regressor.py, cv_hf_regressor.py, …), submission helpers, TMAP HTML, etc.
  • examples/ — small runnable snippets (HF CV, GNN subset, holdout fits).

Fingerprint grid

Descriptors are built for fp sizes 512, 1024, 2048, 4096. Morgan fingerprints use radii 0, 1, 2, 3 (RDKit bond-radius / “hop” count), named morgan_r{radius}_{bits|count}_{size}. For each size, RDKit, atom pair, and topological torsion are also included — each as binary (*_bits_{size}) and count (*_count_{size}) via GetFingerprintAsNumPy / GetCountFingerprintAsNumPy, plus rdkit_phys_props. Per-molecule values are cached on disk under ~/.cache/openadnet/fingerprints (override with OPENADNET_FP_CACHE; bump FP_CACHE_VERSION in features_data.py if definitions change).

CV result cache

Completed (descriptor, model) cross-validation metrics are stored in outputs/baseline_cv_cache.json keyed by a hash of the training SMILES + target and the CV config. Reruns skip pairs already in the cache. Remove the file or change CV_RESULT_CACHE_SCHEMA in baseline.py to force a full recompute.

PyG GNN (example run)

Illustrative GIN encoder, 100 epochs per fold, 3-fold CV (script default --n-splits unless overridden), other settings default (scripts/cv_gnn_regressor.py). Command: PYTHONPATH=src python scripts/cv_gnn_regressor.py --epochs 100.

mean RMSEstd RMSEmean MAEstd MAEmean R²std R²
summary0.80740.02410.60610.01030.48130.0156

Per-fold CSV: outputs/dl_cv_gnn_gin_e100_ns3.csv. This is not directly comparable row-for-row to the sklearn baseline table below (different fold count, model family, and training budget).

Latest baseline CV

Baseline cross-validation (pEC50)
descriptormodelmean_rmsestd_rmsemean_maestd_maemean_r2std_r2
0morgan_r1_count_1024lgbm0.73230.02440.54290.02270.57250.0198
1morgan_r1_count_1024hgb0.73340.02720.54230.02310.57120.0237
2morgan_r1_count_2048hgb0.73750.02700.54560.02220.56650.0210
3morgan_r1_count_2048lgbm0.73890.02670.54640.02070.56480.0205
4morgan_r2_count_1024lgbm0.74460.02000.55600.02140.55810.0137
5morgan_r2_count_1024hgb0.74460.02000.55600.02140.55810.0137
6morgan_r2_count_2048lgbm0.74550.01700.55900.01620.55700.0111
7morgan_r2_count_2048hgb0.74560.01710.55900.01620.55690.0112
8morgan_r1_count_512lgbm0.75030.03150.55500.02590.55110.0278
9morgan_r1_count_512hgb0.75040.03150.55500.02600.55110.0278
10atom_pair_count_2048hgb0.75820.02050.56540.01520.54130.0257
11atom_pair_count_2048lgbm0.75830.02050.56540.01520.54120.0257
12atom_pair_count_1024hgb0.76230.01630.56830.00760.53630.0247
13atom_pair_count_1024lgbm0.76290.01580.56840.00690.53560.0238
14morgan_r2_count_512hgb0.76400.01920.56870.01810.53470.0155
15morgan_r2_count_512lgbm0.76400.01920.56870.01810.53460.0155
16morgan_r2_bits_2048lgbm0.76980.01890.58280.01530.52730.0225
17morgan_r2_bits_2048hgb0.76980.01890.58280.01530.52730.0225
18morgan_r1_bits_2048lgbm0.77390.02260.57770.01930.52210.0282
19morgan_r1_bits_2048hgb0.77390.02260.57770.01930.52210.0282
20morgan_r1_bits_1024lgbm0.77490.02390.58090.01930.52110.0266
21morgan_r1_bits_1024hgb0.77490.02390.58090.01930.52110.0266
22atom_pair_count_512svr0.78080.02570.57410.01790.51400.0221
23morgan_r2_bits_1024lgbm0.78260.01600.59010.01130.51140.0250
24morgan_r2_bits_1024hgb0.78260.01600.59010.01130.51140.0250
25atom_pair_count_512lgbm0.78450.02330.58850.01140.50890.0294
26atom_pair_count_512hgb0.78460.02330.58840.01150.50870.0294
27rdkit_phys_propssvr0.78540.03140.56290.01890.50840.0248
28morgan_r1_count_1024rf0.78650.02080.58970.01550.50680.0187
29atom_pair_count_1024svr0.78910.02420.58130.01290.50370.0184
30atom_pair_bits_2048hgb0.78970.02320.59150.01280.50240.0301
31atom_pair_bits_2048lgbm0.78970.02320.59150.01280.50240.0301
32rdkit_count_2048svr0.79070.03020.58500.01950.50140.0299
33morgan_r1_bits_512lgbm0.79070.02960.59480.02350.50120.0319
34morgan_r1_bits_512hgb0.79070.02960.59480.02350.50120.0319
35morgan_r1_count_2048rf0.79300.01680.59100.01640.49860.0153
36morgan_r2_count_2048rf0.79510.01930.59670.01630.49610.0138
37morgan_r1_count_512rf0.79550.02200.59870.01520.49550.0178
38rdkit_phys_propsrf0.79610.01930.58370.01200.49490.0120
39torsion_count_2048lgbm0.79910.02560.60320.01570.49040.0333
40rdkit_count_2048hgb0.79960.02810.60480.01510.49020.0283
41rdkit_count_1024svr0.79990.02920.59200.01920.48970.0292
42rdkit_count_2048lgbm0.80080.02840.60600.01560.48860.0278
43torsion_count_2048hgb0.80120.02580.60640.01650.48760.0344
44rdkit_phys_propshgb0.80130.01750.58520.01000.48810.0152
45morgan_r2_count_512svr0.80180.02630.59360.02150.48740.0258
46rdkit_phys_propslgbm0.80270.01620.59060.00850.48630.0148
47atom_pair_bits_2048svr0.80280.02720.59050.01830.48620.0241
48rdkit_count_512svr0.80360.03170.59370.02170.48510.0301
49morgan_r2_count_1024rf0.80380.02370.60670.01790.48510.0174
50morgan_r2_bits_512lgbm0.80490.01920.60700.01120.48340.0195
51morgan_r2_bits_512hgb0.80490.01920.60700.01120.48340.0195
52atom_pair_count_2048svr0.80870.02510.59660.01140.47860.0232
53torsion_count_1024hgb0.81150.02780.61220.01960.47460.0330
54morgan_r2_count_1024svr0.81210.02350.59790.01960.47410.0238
55torsion_count_1024lgbm0.81220.02620.61330.01940.47390.0274
56morgan_r1_count_512svr0.81340.02470.59690.01760.47260.0202
57rdkit_count_1024hgb0.81530.02640.61580.01470.47000.0245
58morgan_r0_count_1024lgbm0.81580.02740.60080.01580.46960.0205
59morgan_r0_count_2048lgbm0.81580.02750.60080.01590.46960.0206
60morgan_r0_count_1024hgb0.81590.02730.60080.01580.46960.0205
61morgan_r0_count_2048hgb0.81590.02740.60080.01590.46950.0205
62morgan_r0_count_1024svr0.81670.02540.58990.01650.46840.0190
63morgan_r0_count_2048svr0.81670.02540.58990.01650.46840.0190
64rdkit_count_1024lgbm0.81670.02880.61680.01560.46810.0276
65rdkit_bits_2048svr0.81750.03620.60850.02160.46710.0361
66atom_pair_count_2048rf0.81900.02550.62000.01680.46510.0264
67morgan_r2_count_512rf0.82130.02460.61890.01630.46240.0190
68morgan_r0_count_512svr0.82170.02910.59420.01830.46190.0248
69torsion_count_512hgb0.82410.02450.62200.02110.45860.0232
70morgan_r2_bits_512svr0.82440.02580.61110.02050.45800.0269
71morgan_r2_bits_1024svr0.82480.02150.60810.01960.45760.0218
72torsion_count_512lgbm0.82490.02650.62180.02240.45750.0260
73morgan_r1_count_1024svr0.82500.01760.60090.01480.45720.0191
74morgan_r0_count_512hgb0.82620.02390.61000.01320.45600.0199
75morgan_r0_count_512lgbm0.82620.02390.61000.01320.45590.0199
76torsion_bits_2048lgbm0.82620.02890.62280.02090.45570.0284
77torsion_bits_2048hgb0.82620.02890.62280.02090.45570.0284
78morgan_r1_bits_2048rf0.82650.01890.61870.01490.45510.0245
79morgan_r1_bits_1024rf0.82800.02040.62150.01720.45330.0218
80atom_pair_count_1024rf0.82830.02460.63060.01600.45290.0270
81morgan_r1_count_2048svr0.82870.01910.60070.01500.45240.0191
82morgan_r0_count_1024rf0.82900.02420.61870.01150.45230.0177
83atom_pair_bits_1024svr0.82940.03200.61460.02210.45150.0316
84morgan_r0_count_2048rf0.82990.02410.61910.01140.45110.0174
85rdkit_bits_2048lgbm0.83050.03180.62950.01890.45020.0295
86rdkit_bits_2048hgb0.83050.03180.62950.01890.45020.0295
87rdkit_count_512lgbm0.83440.02340.62660.01320.44480.0239
88atom_pair_bits_1024lgbm0.83450.02080.62720.01210.44440.0296
89atom_pair_bits_1024hgb0.83450.02080.62720.01210.44440.0296
90morgan_r0_count_512rf0.83480.02520.62550.00960.44450.0207
91torsion_bits_1024lgbm0.83560.02040.63050.01490.44330.0206
92torsion_bits_1024hgb0.83560.02040.63050.01490.44330.0206
93rdkit_count_512hgb0.83600.02820.62960.01880.44260.0294
94morgan_r1_bits_512svr0.83610.02600.61690.01670.44260.0265
95morgan_r2_bits_2048rf0.83780.01040.63110.00710.44040.0130
96morgan_r2_count_2048svr0.83890.02850.61600.01910.43890.0276
97torsion_bits_512lgbm0.83970.02190.63660.01010.43770.0225
98torsion_bits_512hgb0.83970.02190.63660.01010.43770.0225
99torsion_bits_2048svr0.83980.02630.62260.01620.43760.0264
100torsion_count_512svr0.84040.02870.62180.01740.43690.0292
101morgan_r1_bits_2048svr0.84140.01960.61220.01140.43560.0197
102morgan_r1_bits_512rf0.84220.02320.63690.01680.43460.0217
103morgan_r1_count_512ridge0.84320.01700.62090.01910.43290.0234
104morgan_r1_bits_1024svr0.84380.01880.61800.01300.43220.0206
105morgan_r2_bits_2048svr0.84400.02490.62080.01910.43220.0224
106torsion_bits_1024svr0.84560.02600.62970.01710.43010.0210
107rdkit_count_2048rf0.84590.03010.65010.01950.42970.0267
108torsion_count_1024svr0.85000.03180.62780.01910.42370.0341
109torsion_bits_512svr0.85020.02580.63680.01940.42390.0221
110rdkit_bits_1024svr0.85100.03610.63520.02350.42260.0361
111atom_pair_count_512rf0.85120.02100.64820.01220.42230.0222
112morgan_r2_count_512ridge0.85250.02110.64190.02220.41980.0387
113morgan_r2_bits_1024rf0.85270.01110.64780.00780.42040.0122
114atom_pair_bits_2048rf0.85350.01890.64940.01110.41910.0206
115morgan_r1_bits_512ridge0.85440.01840.64930.01260.41760.0271
116rdkit_count_1024rf0.85530.02940.65730.01770.41690.0257
117atom_pair_count_512ridge0.85620.01280.64830.00930.41470.0346
118morgan_r1_count_2048elasticnet0.85660.01230.65270.00990.41510.0101
119rdkit_bits_1024hgb0.85950.03170.65200.01630.41080.0353
120rdkit_bits_1024lgbm0.85950.03170.65200.01630.41080.0353
121morgan_r1_count_1024elasticnet0.86080.01550.65970.01140.40920.0146
122torsion_count_2048svr0.86420.02760.63470.01670.40450.0292
123rdkit_count_512rf0.86490.03110.66030.01820.40380.0278
124morgan_r2_count_2048elasticnet0.86540.01130.66330.00990.40310.0067
125morgan_r2_bits_512rf0.86570.01720.66310.00950.40270.0083
126atom_pair_count_2048elasticnet0.86590.00850.66220.00570.40200.0186
127atom_pair_bits_2048elasticnet0.86890.02440.66460.01470.39800.0276
128morgan_r1_bits_2048elasticnet0.87030.01340.66790.01400.39630.0059
129atom_pair_bits_512svr0.87180.03720.64470.02360.39410.0379
130atom_pair_count_1024elasticnet0.87500.01010.67610.00780.38960.0113
131morgan_r1_count_512elasticnet0.87530.01420.67140.00910.38920.0142
132morgan_r2_bits_512ridge0.87660.01890.67340.01700.38650.0385
133rdkit_bits_2048rf0.87680.02510.68260.01310.38730.0200
134morgan_r2_count_1024elasticnet0.87730.01040.67700.00940.38650.0079
135morgan_r1_bits_1024elasticnet0.87730.01500.67690.01410.38660.0081
136morgan_r2_bits_2048elasticnet0.87820.01390.67750.01470.38530.0052
137torsion_count_2048rf0.88260.01950.67320.00730.37860.0278
138torsion_bits_2048rf0.88280.02430.68170.01770.37850.0288
139atom_pair_bits_512lgbm0.88350.02830.66890.01950.37750.0315
140atom_pair_bits_512hgb0.88350.02830.66890.01950.37750.0315
141torsion_count_512rf0.88470.02320.68220.01950.37580.0282
142torsion_count_1024rf0.88520.02080.67930.01350.37510.0243
143morgan_r1_bits_1024ridge0.88930.02550.66270.01540.36970.0231
144atom_pair_bits_1024rf0.89000.01730.68340.01140.36840.0201
145morgan_r1_bits_512elasticnet0.89070.01670.68970.01320.36760.0123
146rdkit_bits_1024rf0.89210.02550.68850.01520.36560.0211
147torsion_bits_512rf0.89340.02070.70070.01710.36360.0244
148morgan_r2_count_512elasticnet0.89360.01090.68960.00960.36340.0093
149torsion_bits_1024rf0.89510.02550.69460.01730.36110.0308
150morgan_r0_count_2048ridge0.89580.01580.66860.00820.36020.0185
151morgan_r0_count_1024ridge0.89580.01580.66860.00820.36020.0185
152atom_pair_count_512elasticnet0.89770.01470.69920.01110.35750.0194
153rdkit_bits_2048elasticnet0.89870.03250.69370.01960.35610.0340
154morgan_r2_count_1024ridge0.90070.01750.68540.01190.35230.0391
155rdkit_bits_512svr0.90180.04520.66950.03020.35160.0473
156rdkit_phys_propsridge0.90240.02820.67670.01250.35110.0225
157torsion_count_512ridge0.90580.03440.68320.02630.34620.0282
158morgan_r2_bits_1024elasticnet0.90600.01650.70570.01570.34590.0049
159rdkit_count_2048elasticnet0.90650.02120.70650.01400.34500.0160
160rdkit_bits_512hgb0.90920.02970.69140.01950.34090.0317
161rdkit_bits_512lgbm0.90920.02970.69140.01950.34090.0317
162atom_pair_bits_1024elasticnet0.91090.02000.70100.01220.33860.0165
163morgan_r0_count_512ridge0.91170.01480.68400.00640.33740.0139
164rdkit_bits_1024elasticnet0.91200.03110.69790.01900.33710.0283
165rdkit_count_512ridge0.91290.00870.70150.00520.33490.0309
166atom_pair_bits_512rf0.91400.01780.70490.01150.33390.0205
167morgan_r2_bits_1024ridge0.91590.00850.70690.01450.33080.0255
168morgan_r2_bits_512elasticnet0.91980.01970.71740.01730.32570.0093
169rdkit_bits_512rf0.92260.03220.70860.01930.32160.0295
170rdkit_phys_propselasticnet0.92570.02720.70930.01280.31700.0254
171morgan_r0_bits_1024lgbm0.92700.01490.70330.01470.31480.0227
172morgan_r0_bits_2048lgbm0.92700.01490.70330.01470.31480.0227
173morgan_r0_bits_2048hgb0.92700.01490.70330.01470.31480.0227
174morgan_r0_bits_1024hgb0.92700.01490.70330.01470.31480.0227
175torsion_bits_512ridge0.92710.02280.70540.01320.31440.0340
176morgan_r0_bits_1024svr0.92940.02590.68420.02290.31140.0253
177morgan_r0_bits_2048svr0.92940.02590.68420.02290.31140.0253
178morgan_r1_count_1024ridge0.92960.05270.66040.02650.31040.0626
179morgan_r0_count_1024elasticnet0.93500.02010.72820.01140.30310.0196
180morgan_r0_count_2048elasticnet0.93500.02010.72820.01140.30310.0196
181morgan_r1_bits_2048ridge0.93800.01300.69490.01020.29810.0295
182rdkit_count_1024elasticnet0.93810.02090.73350.01140.29850.0177
183morgan_r0_bits_512svr0.93960.02980.69170.02470.29620.0291
184morgan_r0_bits_512lgbm0.93970.02140.71300.01710.29590.0259
185morgan_r0_bits_512hgb0.93970.02140.71300.01710.29590.0259
186rdkit_bits_512elasticnet0.94310.03190.72490.02110.29130.0275
187morgan_r1_count_2048ridge0.94320.03250.68150.02270.29060.0381
188torsion_bits_1024elasticnet0.94490.02130.74440.01650.28840.0186
189morgan_r0_count_512elasticnet0.94590.01720.73850.00980.28680.0179
190torsion_bits_512elasticnet0.94630.02380.74710.01890.28630.0182
191morgan_r0_bits_1024ridge0.94690.01560.73810.01700.28520.0181
192morgan_r0_bits_2048ridge0.94690.01560.73810.01700.28520.0181
193torsion_bits_2048elasticnet0.94710.02040.74600.01770.28500.0182
194torsion_count_2048elasticnet0.94760.01540.74650.01250.28410.0152
195rdkit_count_512elasticnet0.94860.02030.74690.01440.28280.0132
196torsion_count_1024elasticnet0.95690.01650.75540.01360.27000.0160
197torsion_bits_1024ridge0.95760.01370.71750.00840.26820.0355
198atom_pair_bits_512elasticnet0.96000.02140.73960.01380.26520.0230
199atom_pair_bits_512ridge0.96080.02550.73210.01990.26390.0323
200morgan_r0_bits_512ridge0.96160.01640.75270.01770.26290.0186
201rdkit_bits_512ridge0.96190.03010.73970.02040.26270.0255
202rdkit_count_1024ridge0.96720.02900.73930.01140.25290.0543
203torsion_count_512elasticnet0.96870.01760.76620.01510.25200.0125
204morgan_r0_bits_1024elasticnet0.97310.02180.76680.01950.24540.0143
205morgan_r0_bits_2048elasticnet0.97310.02180.76680.01950.24540.0143
206morgan_r0_bits_2048rf0.98210.02100.74690.01390.23120.0192
207morgan_r0_bits_1024rf0.98270.02050.74720.01340.23030.0177
208morgan_r0_bits_512elasticnet0.98580.01940.77970.01620.22560.0104
209atom_pair_count_1024ridge0.98640.07090.69340.01500.21600.1398
210rdkit_bits_1024ridge0.99280.02740.76710.02440.21390.0381
211morgan_r0_bits_512rf0.99410.02140.75830.01550.21230.0186
212torsion_bits_2048ridge1.03570.01350.76820.01060.14440.0319
213atom_pair_bits_1024ridge1.04210.05670.76260.00920.13200.0933
214torsion_count_1024ridge1.06620.10560.72620.02520.08490.1897
215morgan_r2_bits_2048ridge1.16380.02530.90140.0243-0.08100.0624
216morgan_r2_count_2048ridge1.16900.03800.89360.0230-0.09140.0837
217atom_pair_bits_2048ridge1.24940.04840.89420.0319-0.24410.0630
218rdkit_bits_2048ridge1.25350.01450.98900.0121-0.25420.0653
219rdkit_count_2048ridge1.28210.07940.96110.0505-0.31570.1655
220torsion_count_2048ridge1.41000.18090.87230.0313-0.61260.3883
221atom_pair_count_2048ridge2.23021.18551.03320.0668-4.17736.0527
5-fold CV on the training set; metrics are out-of-fold. Sorted by mean RMSE (lower is better).

Artifacts

After a run, see:

  • outputs/baseline_cv_results.csv — full numeric results
  • outputs/baseline_cv_results.html — the same table as standalone HTML (also embedded above via better-tables)

Run

cd openadnet
PYTHONPATH=src python src/score_data.py

To refresh the leaderboard table from cached JSON only (no new CV runs), use scripts/readme_from_baseline_cache.py — it fails if any pair is missing from outputs/baseline_cv_cache.json (use --fill-missing to compute missing pairs first).

Requires Hugging Face Hub access for the training CSV on first load (cached afterward). Set HF_TOKEN for higher rate limits.

Graph- and transformer-based CV (optional openadnet[dl]) is wired through scripts/cv_gnn_regressor.py, scripts/cv_hf_regressor.py, and related drivers under scripts/; see docs/pyg_gnn.md for the PyG pipeline. PyG GNN CV defaults to 50 epochs per fold (--epochs to change); use --cpu if CUDA runs out of memory.

Custom estimators and CV

Use the same cross-validation loop as score_data.py, but pass your own regressors mapping (string label → unfitted scikit-learn regressor). Labels appear in the results table under model.

Steps

  1. From the openadnet package directory, set PYTHONPATH=src so modules baseline, load_data, and features_data import correctly.
  2. Load the training table and build RDKit molecules from SMILES (same pattern as score_data.py).
  3. Build a regressors dict: keys are short names for reporting; values must be sklearn-style regressors implementing fit / predict (typically unfitted instances).
  4. Optionally set descriptor_names to a subset of list_descriptor_names() from features_data (otherwise the full grid runs).
  5. Optionally set BaselineCVConfig (y_col, n_splits, shuffle, cv_random_state, model_random_state).
  6. Call run_baseline_cv(...) with your regressors and config. Use cv_cache_path pointing to a separate JSON file if you do not want custom runs mixed into the default outputs/baseline_cv_cache.json, or set use_cv_cache=False to always refit. show_progress=False disables tqdm.

Pipeline wrapping: make_regressor_pipeline in baseline.py prepends SimpleImputer and, only when the key is exactly ridge, elasticnet, or svr, a StandardScaler. Other keys get imputer + model only. If your estimator needs scaling under a different name, wrap it in a small sklearn Pipeline (e.g. StandardScaler then your regressor) and pass that as the dict value.

Example

from pathlib import Path

from rdkit import Chem
from sklearn.linear_model import HuberRegressor

from baseline import BaselineCVConfig, run_baseline_cv
from load_data import train

mols = list(train["SMILES"].apply(Chem.MolFromSmiles))

regressors = {
    "huber": HuberRegressor(epsilon=1.35, max_iter=200),
}

results = run_baseline_cv(
    train,
    mols,
    descriptor_names=["morgan_r2_bits_2048", "rdkit_phys_props"],
    regressors=regressors,
    config=BaselineCVConfig(n_splits=5),
    cv_cache_path=Path("outputs/baseline_cv_custom.json"),
    use_cv_cache=True,
    show_progress=True,
)
print(results)

Run with: PYTHONPATH=src python your_script.py from the openadnet package root.

EricBoittier/openadnet

HTML

2

80 commits

updated Apr 12, 2026

See the code

README

openadnet

Code and baselines for PXR (pregnane X receptor) activity modeling on the OpenADMET / Hugging Face challenge data: RDKit fingerprints plus classical regressors, optional PyTorch Geometric graph models, HuggingFace encoder regressors, delta learning, ensembles, submission CSV helpers, uncertainty (including conformal-style tooling), and visualization (e.g. TMAP, plots in viz).

TopicWhere to start
Install & optional DL stackInstallation
Sklearn CV grid & cachingFingerprint grid, CV result cache
Full baseline leaderboardLatest baseline CV
PyG SMILES → graph → regressiondocs/pyg_gnn.md
Example PyG GNN CVPyG GNN (example run)
Challenge submission CSVsrc/submission.py, scripts/write_submission.py

Installation

From the repository root (Python ≥ 3.13):

pip install -e .

Optional extras (see pyproject.toml):

pip install -e ".[dl]"     # torch, transformers, torch-geometric — GNNs & HF regressors
pip install -e ".[hydra]"  # Hydra for experiment sweeps (e.g. `scripts/hydra_gnn_sweep.py`)

Training data are loaded via Hugging Face Hub on first use and cached locally; set HF_TOKEN for higher rate limits.

Repository layout (high level)

  • src/baseline.py, src/features_data.py, src/score_data.py — descriptor grid, CV loop, default baseline run.
  • src/models/ — GNNRegressor, HuggingFaceRegressor, ensembles, cv_dl for neural CV; src/models/data/graph.py builds PyG graphs from SMILES.
  • src/delta_learning.py — delta-learning helpers used with the baseline / DL stack.
  • src/submission.py — validate predictions and write challenge-shaped submission files.
  • src/uncertainty/ — uncertainty and related plotting utilities.
  • scripts/ — CV drivers (cv_gnn_regressor.py, cv_hf_regressor.py, …), submission helpers, TMAP HTML, etc.
  • examples/ — small runnable snippets (HF CV, GNN subset, holdout fits).

Fingerprint grid

Descriptors are built for fp sizes 512, 1024, 2048, 4096. Morgan fingerprints use radii 0, 1, 2, 3 (RDKit bond-radius / “hop” count), named morgan_r{radius}_{bits|count}_{size}. For each size, RDKit, atom pair, and topological torsion are also included — each as binary (*_bits_{size}) and count (*_count_{size}) via GetFingerprintAsNumPy / GetCountFingerprintAsNumPy, plus rdkit_phys_props. Per-molecule values are cached on disk under ~/.cache/openadnet/fingerprints (override with OPENADNET_FP_CACHE; bump FP_CACHE_VERSION in features_data.py if definitions change).

CV result cache

Completed (descriptor, model) cross-validation metrics are stored in outputs/baseline_cv_cache.json keyed by a hash of the training SMILES + target and the CV config. Reruns skip pairs already in the cache. Remove the file or change CV_RESULT_CACHE_SCHEMA in baseline.py to force a full recompute.

PyG GNN (example run)

Illustrative GIN encoder, 100 epochs per fold, 3-fold CV (script default --n-splits unless overridden), other settings default (scripts/cv_gnn_regressor.py). Command: PYTHONPATH=src python scripts/cv_gnn_regressor.py --epochs 100.

mean RMSEstd RMSEmean MAEstd MAEmean R²std R²
summary0.80740.02410.60610.01030.48130.0156

Per-fold CSV: outputs/dl_cv_gnn_gin_e100_ns3.csv. This is not directly comparable row-for-row to the sklearn baseline table below (different fold count, model family, and training budget).

Latest baseline CV

Baseline cross-validation (pEC50)
descriptormodelmean_rmsestd_rmsemean_maestd_maemean_r2std_r2
0morgan_r1_count_1024lgbm0.73230.02440.54290.02270.57250.0198
1morgan_r1_count_1024hgb0.73340.02720.54230.02310.57120.0237
2morgan_r1_count_2048hgb0.73750.02700.54560.02220.56650.0210
3morgan_r1_count_2048lgbm0.73890.02670.54640.02070.56480.0205
4morgan_r2_count_1024lgbm0.74460.02000.55600.02140.55810.0137
5morgan_r2_count_1024hgb0.74460.02000.55600.02140.55810.0137
6morgan_r2_count_2048lgbm0.74550.01700.55900.01620.55700.0111
7morgan_r2_count_2048hgb0.74560.01710.55900.01620.55690.0112
8morgan_r1_count_512lgbm0.75030.03150.55500.02590.55110.0278
9morgan_r1_count_512hgb0.75040.03150.55500.02600.55110.0278
10atom_pair_count_2048hgb0.75820.02050.56540.01520.54130.0257
11atom_pair_count_2048lgbm0.75830.02050.56540.01520.54120.0257
12atom_pair_count_1024hgb0.76230.01630.56830.00760.53630.0247
13atom_pair_count_1024lgbm0.76290.01580.56840.00690.53560.0238
14morgan_r2_count_512hgb0.76400.01920.56870.01810.53470.0155
15morgan_r2_count_512lgbm0.76400.01920.56870.01810.53460.0155
16morgan_r2_bits_2048lgbm0.76980.01890.58280.01530.52730.0225
17morgan_r2_bits_2048hgb0.76980.01890.58280.01530.52730.0225
18morgan_r1_bits_2048lgbm0.77390.02260.57770.01930.52210.0282
19morgan_r1_bits_2048hgb0.77390.02260.57770.01930.52210.0282
20morgan_r1_bits_1024lgbm0.77490.02390.58090.01930.52110.0266
21morgan_r1_bits_1024hgb0.77490.02390.58090.01930.52110.0266
22atom_pair_count_512svr0.78080.02570.57410.01790.51400.0221
23morgan_r2_bits_1024lgbm0.78260.01600.59010.01130.51140.0250
24morgan_r2_bits_1024hgb0.78260.01600.59010.01130.51140.0250
25atom_pair_count_512lgbm0.78450.02330.58850.01140.50890.0294
26atom_pair_count_512hgb0.78460.02330.58840.01150.50870.0294
27rdkit_phys_propssvr0.78540.03140.56290.01890.50840.0248
28morgan_r1_count_1024rf0.78650.02080.58970.01550.50680.0187
29atom_pair_count_1024svr0.78910.02420.58130.01290.50370.0184
30atom_pair_bits_2048hgb0.78970.02320.59150.01280.50240.0301
31atom_pair_bits_2048lgbm0.78970.02320.59150.01280.50240.0301
32rdkit_count_2048svr0.79070.03020.58500.01950.50140.0299
33morgan_r1_bits_512lgbm0.79070.02960.59480.02350.50120.0319
34morgan_r1_bits_512hgb0.79070.02960.59480.02350.50120.0319
35morgan_r1_count_2048rf0.79300.01680.59100.01640.49860.0153
36morgan_r2_count_2048rf0.79510.01930.59670.01630.49610.0138
37morgan_r1_count_512rf0.79550.02200.59870.01520.49550.0178
38rdkit_phys_propsrf0.79610.01930.58370.01200.49490.0120
39torsion_count_2048lgbm0.79910.02560.60320.01570.49040.0333
40rdkit_count_2048hgb0.79960.02810.60480.01510.49020.0283
41rdkit_count_1024svr0.79990.02920.59200.01920.48970.0292
42rdkit_count_2048lgbm0.80080.02840.60600.01560.48860.0278
43torsion_count_2048hgb0.80120.02580.60640.01650.48760.0344
44rdkit_phys_propshgb0.80130.01750.58520.01000.48810.0152
45morgan_r2_count_512svr0.80180.02630.59360.02150.48740.0258
46rdkit_phys_propslgbm0.80270.01620.59060.00850.48630.0148
47atom_pair_bits_2048svr0.80280.02720.59050.01830.48620.0241
48rdkit_count_512svr0.80360.03170.59370.02170.48510.0301
49morgan_r2_count_1024rf0.80380.02370.60670.01790.48510.0174
50morgan_r2_bits_512lgbm0.80490.01920.60700.01120.48340.0195
51morgan_r2_bits_512hgb0.80490.01920.60700.01120.48340.0195
52atom_pair_count_2048svr0.80870.02510.59660.01140.47860.0232
53torsion_count_1024hgb0.81150.02780.61220.01960.47460.0330
54morgan_r2_count_1024svr0.81210.02350.59790.01960.47410.0238
55torsion_count_1024lgbm0.81220.02620.61330.01940.47390.0274
56morgan_r1_count_512svr0.81340.02470.59690.01760.47260.0202
57rdkit_count_1024hgb0.81530.02640.61580.01470.47000.0245
58morgan_r0_count_1024lgbm0.81580.02740.60080.01580.46960.0205
59morgan_r0_count_2048lgbm0.81580.02750.60080.01590.46960.0206
60morgan_r0_count_1024hgb0.81590.02730.60080.01580.46960.0205
61morgan_r0_count_2048hgb0.81590.02740.60080.01590.46950.0205
62morgan_r0_count_1024svr0.81670.02540.58990.01650.46840.0190
63morgan_r0_count_2048svr0.81670.02540.58990.01650.46840.0190
64rdkit_count_1024lgbm0.81670.02880.61680.01560.46810.0276
65rdkit_bits_2048svr0.81750.03620.60850.02160.46710.0361
66atom_pair_count_2048rf0.81900.02550.62000.01680.46510.0264
67morgan_r2_count_512rf0.82130.02460.61890.01630.46240.0190
68morgan_r0_count_512svr0.82170.02910.59420.01830.46190.0248
69torsion_count_512hgb0.82410.02450.62200.02110.45860.0232
70morgan_r2_bits_512svr0.82440.02580.61110.02050.45800.0269
71morgan_r2_bits_1024svr0.82480.02150.60810.01960.45760.0218
72torsion_count_512lgbm0.82490.02650.62180.02240.45750.0260
73morgan_r1_count_1024svr0.82500.01760.60090.01480.45720.0191
74morgan_r0_count_512hgb0.82620.02390.61000.01320.45600.0199
75morgan_r0_count_512lgbm0.82620.02390.61000.01320.45590.0199
76torsion_bits_2048lgbm0.82620.02890.62280.02090.45570.0284
77torsion_bits_2048hgb0.82620.02890.62280.02090.45570.0284
78morgan_r1_bits_2048rf0.82650.01890.61870.01490.45510.0245
79morgan_r1_bits_1024rf0.82800.02040.62150.01720.45330.0218
80atom_pair_count_1024rf0.82830.02460.63060.01600.45290.0270
81morgan_r1_count_2048svr0.82870.01910.60070.01500.45240.0191
82morgan_r0_count_1024rf0.82900.02420.61870.01150.45230.0177
83atom_pair_bits_1024svr0.82940.03200.61460.02210.45150.0316
84morgan_r0_count_2048rf0.82990.02410.61910.01140.45110.0174
85rdkit_bits_2048lgbm0.83050.03180.62950.01890.45020.0295
86rdkit_bits_2048hgb0.83050.03180.62950.01890.45020.0295
87rdkit_count_512lgbm0.83440.02340.62660.01320.44480.0239
88atom_pair_bits_1024lgbm0.83450.02080.62720.01210.44440.0296
89atom_pair_bits_1024hgb0.83450.02080.62720.01210.44440.0296
90morgan_r0_count_512rf0.83480.02520.62550.00960.44450.0207
91torsion_bits_1024lgbm0.83560.02040.63050.01490.44330.0206
92torsion_bits_1024hgb0.83560.02040.63050.01490.44330.0206
93rdkit_count_512hgb0.83600.02820.62960.01880.44260.0294
94morgan_r1_bits_512svr0.83610.02600.61690.01670.44260.0265
95morgan_r2_bits_2048rf0.83780.01040.63110.00710.44040.0130
96morgan_r2_count_2048svr0.83890.02850.61600.01910.43890.0276
97torsion_bits_512lgbm0.83970.02190.63660.01010.43770.0225
98torsion_bits_512hgb0.83970.02190.63660.01010.43770.0225
99torsion_bits_2048svr0.83980.02630.62260.01620.43760.0264
100torsion_count_512svr0.84040.02870.62180.01740.43690.0292
101morgan_r1_bits_2048svr0.84140.01960.61220.01140.43560.0197
102morgan_r1_bits_512rf0.84220.02320.63690.01680.43460.0217
103morgan_r1_count_512ridge0.84320.01700.62090.01910.43290.0234
104morgan_r1_bits_1024svr0.84380.01880.61800.01300.43220.0206
105morgan_r2_bits_2048svr0.84400.02490.62080.01910.43220.0224
106torsion_bits_1024svr0.84560.02600.62970.01710.43010.0210
107rdkit_count_2048rf0.84590.03010.65010.01950.42970.0267
108torsion_count_1024svr0.85000.03180.62780.01910.42370.0341
109torsion_bits_512svr0.85020.02580.63680.01940.42390.0221
110rdkit_bits_1024svr0.85100.03610.63520.02350.42260.0361
111atom_pair_count_512rf0.85120.02100.64820.01220.42230.0222
112morgan_r2_count_512ridge0.85250.02110.64190.02220.41980.0387
113morgan_r2_bits_1024rf0.85270.01110.64780.00780.42040.0122
114atom_pair_bits_2048rf0.85350.01890.64940.01110.41910.0206
115morgan_r1_bits_512ridge0.85440.01840.64930.01260.41760.0271
116rdkit_count_1024rf0.85530.02940.65730.01770.41690.0257
117atom_pair_count_512ridge0.85620.01280.64830.00930.41470.0346
118morgan_r1_count_2048elasticnet0.85660.01230.65270.00990.41510.0101
119rdkit_bits_1024hgb0.85950.03170.65200.01630.41080.0353
120rdkit_bits_1024lgbm0.85950.03170.65200.01630.41080.0353
121morgan_r1_count_1024elasticnet0.86080.01550.65970.01140.40920.0146
122torsion_count_2048svr0.86420.02760.63470.01670.40450.0292
123rdkit_count_512rf0.86490.03110.66030.01820.40380.0278
124morgan_r2_count_2048elasticnet0.86540.01130.66330.00990.40310.0067
125morgan_r2_bits_512rf0.86570.01720.66310.00950.40270.0083
126atom_pair_count_2048elasticnet0.86590.00850.66220.00570.40200.0186
127atom_pair_bits_2048elasticnet0.86890.02440.66460.01470.39800.0276
128morgan_r1_bits_2048elasticnet0.87030.01340.66790.01400.39630.0059
129atom_pair_bits_512svr0.87180.03720.64470.02360.39410.0379
130atom_pair_count_1024elasticnet0.87500.01010.67610.00780.38960.0113
131morgan_r1_count_512elasticnet0.87530.01420.67140.00910.38920.0142
132morgan_r2_bits_512ridge0.87660.01890.67340.01700.38650.0385
133rdkit_bits_2048rf0.87680.02510.68260.01310.38730.0200
134morgan_r2_count_1024elasticnet0.87730.01040.67700.00940.38650.0079
135morgan_r1_bits_1024elasticnet0.87730.01500.67690.01410.38660.0081
136morgan_r2_bits_2048elasticnet0.87820.01390.67750.01470.38530.0052
137torsion_count_2048rf0.88260.01950.67320.00730.37860.0278
138torsion_bits_2048rf0.88280.02430.68170.01770.37850.0288
139atom_pair_bits_512lgbm0.88350.02830.66890.01950.37750.0315
140atom_pair_bits_512hgb0.88350.02830.66890.01950.37750.0315
141torsion_count_512rf0.88470.02320.68220.01950.37580.0282
142torsion_count_1024rf0.88520.02080.67930.01350.37510.0243
143morgan_r1_bits_1024ridge0.88930.02550.66270.01540.36970.0231
144atom_pair_bits_1024rf0.89000.01730.68340.01140.36840.0201
145morgan_r1_bits_512elasticnet0.89070.01670.68970.01320.36760.0123
146rdkit_bits_1024rf0.89210.02550.68850.01520.36560.0211
147torsion_bits_512rf0.89340.02070.70070.01710.36360.0244
148morgan_r2_count_512elasticnet0.89360.01090.68960.00960.36340.0093
149torsion_bits_1024rf0.89510.02550.69460.01730.36110.0308
150morgan_r0_count_2048ridge0.89580.01580.66860.00820.36020.0185
151morgan_r0_count_1024ridge0.89580.01580.66860.00820.36020.0185
152atom_pair_count_512elasticnet0.89770.01470.69920.01110.35750.0194
153rdkit_bits_2048elasticnet0.89870.03250.69370.01960.35610.0340
154morgan_r2_count_1024ridge0.90070.01750.68540.01190.35230.0391
155rdkit_bits_512svr0.90180.04520.66950.03020.35160.0473
156rdkit_phys_propsridge0.90240.02820.67670.01250.35110.0225
157torsion_count_512ridge0.90580.03440.68320.02630.34620.0282
158morgan_r2_bits_1024elasticnet0.90600.01650.70570.01570.34590.0049
159rdkit_count_2048elasticnet0.90650.02120.70650.01400.34500.0160
160rdkit_bits_512hgb0.90920.02970.69140.01950.34090.0317
161rdkit_bits_512lgbm0.90920.02970.69140.01950.34090.0317
162atom_pair_bits_1024elasticnet0.91090.02000.70100.01220.33860.0165
163morgan_r0_count_512ridge0.91170.01480.68400.00640.33740.0139
164rdkit_bits_1024elasticnet0.91200.03110.69790.01900.33710.0283
165rdkit_count_512ridge0.91290.00870.70150.00520.33490.0309
166atom_pair_bits_512rf0.91400.01780.70490.01150.33390.0205
167morgan_r2_bits_1024ridge0.91590.00850.70690.01450.33080.0255
168morgan_r2_bits_512elasticnet0.91980.01970.71740.01730.32570.0093
169rdkit_bits_512rf0.92260.03220.70860.01930.32160.0295
170rdkit_phys_propselasticnet0.92570.02720.70930.01280.31700.0254
171morgan_r0_bits_1024lgbm0.92700.01490.70330.01470.31480.0227
172morgan_r0_bits_2048lgbm0.92700.01490.70330.01470.31480.0227
173morgan_r0_bits_2048hgb0.92700.01490.70330.01470.31480.0227
174morgan_r0_bits_1024hgb0.92700.01490.70330.01470.31480.0227
175torsion_bits_512ridge0.92710.02280.70540.01320.31440.0340
176morgan_r0_bits_1024svr0.92940.02590.68420.02290.31140.0253
177morgan_r0_bits_2048svr0.92940.02590.68420.02290.31140.0253
178morgan_r1_count_1024ridge0.92960.05270.66040.02650.31040.0626
179morgan_r0_count_1024elasticnet0.93500.02010.72820.01140.30310.0196
180morgan_r0_count_2048elasticnet0.93500.02010.72820.01140.30310.0196
181morgan_r1_bits_2048ridge0.93800.01300.69490.01020.29810.0295
182rdkit_count_1024elasticnet0.93810.02090.73350.01140.29850.0177
183morgan_r0_bits_512svr0.93960.02980.69170.02470.29620.0291
184morgan_r0_bits_512lgbm0.93970.02140.71300.01710.29590.0259
185morgan_r0_bits_512hgb0.93970.02140.71300.01710.29590.0259
186rdkit_bits_512elasticnet0.94310.03190.72490.02110.29130.0275
187morgan_r1_count_2048ridge0.94320.03250.68150.02270.29060.0381
188torsion_bits_1024elasticnet0.94490.02130.74440.01650.28840.0186
189morgan_r0_count_512elasticnet0.94590.01720.73850.00980.28680.0179
190torsion_bits_512elasticnet0.94630.02380.74710.01890.28630.0182
191morgan_r0_bits_1024ridge0.94690.01560.73810.01700.28520.0181
192morgan_r0_bits_2048ridge0.94690.01560.73810.01700.28520.0181
193torsion_bits_2048elasticnet0.94710.02040.74600.01770.28500.0182
194torsion_count_2048elasticnet0.94760.01540.74650.01250.28410.0152
195rdkit_count_512elasticnet0.94860.02030.74690.01440.28280.0132
196torsion_count_1024elasticnet0.95690.01650.75540.01360.27000.0160
197torsion_bits_1024ridge0.95760.01370.71750.00840.26820.0355
198atom_pair_bits_512elasticnet0.96000.02140.73960.01380.26520.0230
199atom_pair_bits_512ridge0.96080.02550.73210.01990.26390.0323
200morgan_r0_bits_512ridge0.96160.01640.75270.01770.26290.0186
201rdkit_bits_512ridge0.96190.03010.73970.02040.26270.0255
202rdkit_count_1024ridge0.96720.02900.73930.01140.25290.0543
203torsion_count_512elasticnet0.96870.01760.76620.01510.25200.0125
204morgan_r0_bits_1024elasticnet0.97310.02180.76680.01950.24540.0143
205morgan_r0_bits_2048elasticnet0.97310.02180.76680.01950.24540.0143
206morgan_r0_bits_2048rf0.98210.02100.74690.01390.23120.0192
207morgan_r0_bits_1024rf0.98270.02050.74720.01340.23030.0177
208morgan_r0_bits_512elasticnet0.98580.01940.77970.01620.22560.0104
209atom_pair_count_1024ridge0.98640.07090.69340.01500.21600.1398
210rdkit_bits_1024ridge0.99280.02740.76710.02440.21390.0381
211morgan_r0_bits_512rf0.99410.02140.75830.01550.21230.0186
212torsion_bits_2048ridge1.03570.01350.76820.01060.14440.0319
213atom_pair_bits_1024ridge1.04210.05670.76260.00920.13200.0933
214torsion_count_1024ridge1.06620.10560.72620.02520.08490.1897
215morgan_r2_bits_2048ridge1.16380.02530.90140.0243-0.08100.0624
216morgan_r2_count_2048ridge1.16900.03800.89360.0230-0.09140.0837
217atom_pair_bits_2048ridge1.24940.04840.89420.0319-0.24410.0630
218rdkit_bits_2048ridge1.25350.01450.98900.0121-0.25420.0653
219rdkit_count_2048ridge1.28210.07940.96110.0505-0.31570.1655
220torsion_count_2048ridge1.41000.18090.87230.0313-0.61260.3883
221atom_pair_count_2048ridge2.23021.18551.03320.0668-4.17736.0527
5-fold CV on the training set; metrics are out-of-fold. Sorted by mean RMSE (lower is better).

Artifacts

After a run, see:

  • outputs/baseline_cv_results.csv — full numeric results
  • outputs/baseline_cv_results.html — the same table as standalone HTML (also embedded above via better-tables)

Run

cd openadnet
PYTHONPATH=src python src/score_data.py

To refresh the leaderboard table from cached JSON only (no new CV runs), use scripts/readme_from_baseline_cache.py — it fails if any pair is missing from outputs/baseline_cv_cache.json (use --fill-missing to compute missing pairs first).

Requires Hugging Face Hub access for the training CSV on first load (cached afterward). Set HF_TOKEN for higher rate limits.

Graph- and transformer-based CV (optional openadnet[dl]) is wired through scripts/cv_gnn_regressor.py, scripts/cv_hf_regressor.py, and related drivers under scripts/; see docs/pyg_gnn.md for the PyG pipeline. PyG GNN CV defaults to 50 epochs per fold (--epochs to change); use --cpu if CUDA runs out of memory.

Custom estimators and CV

Use the same cross-validation loop as score_data.py, but pass your own regressors mapping (string label → unfitted scikit-learn regressor). Labels appear in the results table under model.

Steps

  1. From the openadnet package directory, set PYTHONPATH=src so modules baseline, load_data, and features_data import correctly.
  2. Load the training table and build RDKit molecules from SMILES (same pattern as score_data.py).
  3. Build a regressors dict: keys are short names for reporting; values must be sklearn-style regressors implementing fit / predict (typically unfitted instances).
  4. Optionally set descriptor_names to a subset of list_descriptor_names() from features_data (otherwise the full grid runs).
  5. Optionally set BaselineCVConfig (y_col, n_splits, shuffle, cv_random_state, model_random_state).
  6. Call run_baseline_cv(...) with your regressors and config. Use cv_cache_path pointing to a separate JSON file if you do not want custom runs mixed into the default outputs/baseline_cv_cache.json, or set use_cv_cache=False to always refit. show_progress=False disables tqdm.

Pipeline wrapping: make_regressor_pipeline in baseline.py prepends SimpleImputer and, only when the key is exactly ridge, elasticnet, or svr, a StandardScaler. Other keys get imputer + model only. If your estimator needs scaling under a different name, wrap it in a small sklearn Pipeline (e.g. StandardScaler then your regressor) and pass that as the dict value.

Example

from pathlib import Path

from rdkit import Chem
from sklearn.linear_model import HuberRegressor

from baseline import BaselineCVConfig, run_baseline_cv
from load_data import train

mols = list(train["SMILES"].apply(Chem.MolFromSmiles))

regressors = {
    "huber": HuberRegressor(epsilon=1.35, max_iter=200),
}

results = run_baseline_cv(
    train,
    mols,
    descriptor_names=["morgan_r2_bits_2048", "rdkit_phys_props"],
    regressors=regressors,
    config=BaselineCVConfig(n_splits=5),
    cv_cache_path=Path("outputs/baseline_cv_custom.json"),
    use_cv_cache=True,
    show_progress=True,
)
print(results)

Run with: PYTHONPATH=src python your_script.py from the openadnet package root.