S3-Prompt / BBBP /preprocess_sampling.log
Syzseisus's picture
Initial release
fc0d038 verified
Raw History Blame Contribute Delete
5.49 kB
=== [BBBP] Verification started at 2026-01-06 12:41:09 ===
========================= Preprocessing BBBP =========================
1. Download dataset from DeepChem
2. Trim columns - keep only SMILES, label, and raw_ID
3. Add embedding - ECFP or MolT5-{small, base, large}
4. Split dataset - stratified for classification, random for regression
======================================================================
==================== Morgan Fingerprint Embedding ====================
Load `df_raw` from `raw_path`: ../MoleculeNetICL_SD-SPL/BBBP/raw.csv
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 2050 entries, 0 to 2049
Data columns (total 4 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 num 2050 non-null int64
1 name 2050 non-null object
2 p_np 2050 non-null int64
3 smiles 2050 non-null object
dtypes: int64(2), object(2)
memory usage: 64.2+ KB
======================================================================
Load `df` from `trimmed_path`: ../MoleculeNetICL_SD-SPL/BBBP/trimmed.csv
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 2040 entries, 0 to 2039
Data columns (total 4 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 raw_ID 2040 non-null int64
1 smiles 2040 non-null object
2 label 2040 non-null int64
3 scaffold_smiles 1941 non-null object
dtypes: int64(2), object(2)
memory usage: 63.9+ KB
======================================================================
Remove 10 rows due to empty SMILES, label or Scaffold SMILES
>> 2040/2050 rows remaining after trimming
======================================================================
Load `embed` column (2040) from `embed_path`: ../MoleculeNetICL_SD-SPL/BBBP/embed_fp_r=2_b=1024.pk
======================================================================
Remove 0 rows due to empty embedding
2040/2040 rows remaining after trimming
======================================================================
Load split dfs from ../MoleculeNetICL_SD-SPL/BBBP
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 1632 entries, 0 to 1631
Data columns (total 3 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 raw_ID 1632 non-null int64
1 smiles 1632 non-null object
2 label 1632 non-null int64
dtypes: int64(2), object(1)
memory usage: 38.4+ KB
======================================================================
# train = 1632
sample: {
raw_ID: 1392
smiles: C3=C(C2(C(N(CN1CCOCC1)C(C2)=O)=O)C)C=CC=C3
label: 1
fp <class 'numpy.ndarray'>
embed: (1024,)
}
# valid = 204
sample: {
raw_ID: 1979
smiles: C1=CC=CC2=C1N(C3=C(S2)C=CC=C3)CC(C)N(C)C
label: 1
embed: (1024,)
}
# test = 204
sample: {
raw_ID: 1450
smiles: CC1OC(C)OC(O1)C
label: 1
embed: (1024,)
}
======================================================================
======================= MolT5-small Embedding ========================
Load `df_raw` from `raw_path`: ../MoleculeNetICL_SD-SPL/BBBP/raw.csv
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 2050 entries, 0 to 2049
Data columns (total 4 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 num 2050 non-null int64
1 name 2050 non-null object
2 p_np 2050 non-null int64
3 smiles 2050 non-null object
dtypes: int64(2), object(2)
memory usage: 64.2+ KB
======================================================================
Load `df` from `trimmed_path`: ../MoleculeNetICL_SD-SPL/BBBP/trimmed.csv
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 2040 entries, 0 to 2039
Data columns (total 4 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 raw_ID 2040 non-null int64
1 smiles 2040 non-null object
2 label 2040 non-null int64
3 scaffold_smiles 1941 non-null object
dtypes: int64(2), object(2)
memory usage: 63.9+ KB
======================================================================
Remove 10 rows due to empty SMILES, label or Scaffold SMILES
>> 2040/2050 rows remaining after trimming
======================================================================
Load `embed` column (2040) from `embed_path`: ../MoleculeNetICL_SD-SPL/BBBP/embed_molt5_small_d512.pt
Remove 0 rows due to empty embedding
2040/2040 rows remaining after trimming
======================================================================
Load split dfs from ../MoleculeNetICL_SD-SPL/BBBP
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 1632 entries, 0 to 1631
Data columns (total 3 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 raw_ID 1632 non-null int64
1 smiles 1632 non-null object
2 label 1632 non-null int64
dtypes: int64(2), object(1)
memory usage: 38.4+ KB
======================================================================
# train = 1632
sample: {
raw_ID: 1392
smiles: C3=C(C2(C(N(CN1CCOCC1)C(C2)=O)=O)C)C=CC=C3
label: 1
small <class 'torch.Tensor'>
embed: torch.Size([512])
}
# valid = 204
sample: {
raw_ID: 1979
smiles: C1=CC=CC2=C1N(C3=C(S2)C=CC=C3)CC(C)N(C)C
label: 1
embed: torch.Size([512])
}
# test = 204
sample: {
raw_ID: 1450
smiles: CC1OC(C)OC(O1)C
label: 1
embed: torch.Size([512])
}
======================================================================