MoleculeNet Classification Data : Modularization, dynamic splits, Clean Code - #174
MoleculeNet Classification Data : Modularization, dynamic splits, Clean Code#174aditya0by0 wants to merge 61 commits into
Conversation
|
@sfluegel05, once I complete the gnn experiments with molecule net dataset, then we could merge the PR. Until then we could keep this PR in the draft state. |
* Rename 'val' to 'validation' in data splits * Update chebi-utils version requirement in pyproject.toml
…abels are None [None, None]
|
@sfluegel05, as I want to train the augmented GNN on the MolNet dataset, I looked into reusing the missing-label handling implemented in #130. Comparing it with HiMol's implementation, I noticed two critical discrepancies in AUROC computation and Loss normalization that may cause behavioral divergence. Please let me know if I am wrong about them or if I am missing something. 1. AUROC Computation
Why this is problematic: (Detailed by Claude)
2. Loss Computation & Denominator Normalization
Why this is problematic: (Detailed by Claude)
|
…hEB-AI/python-chebai into fix/molecule_net_dynamic_split
I have implemented this change, to test that this change doesn't affect the models trained on datasets without any missing labels, I trained same graph based model before and after this change for BBBP and the results were identical down to the last decimal. Before Change: https://wandb.ai/chebai/chebai/runs/zuxii7ad/overview?nw=nwuseraditya0by0 Right now I have implemented the change for graph models, hence this PR will break the missing labels implementation for ELECTRA. To fix it I will create a separate issue for it and it should be fixed in separate PR. |
Changes related to Molecule Net classification introduced in #130
General Changes
Check before dataloader to assert if the data is empty (as pytorch or lightning doesn't check this)
Generalize _DynamicDataset class to all datasets by replacing
_graph_to_raw_datasetto_preprocess_data_into_dataframeModularize splitting logic into separate classes (so we dont need to specifiy the split logic for every new data class, rather just inherent the required splitting logic class )
Suggested Metric as per data type by https://arxiv.org/abs/1703.00564 for Molecule Net dataset