AstraZeneca / chemicalx

A PyTorch and TorchDrug based deep learning library for drug pair scoring. (KDD 2022)
https://chemicalx.readthedocs.io
Apache License 2.0
702 stars 89 forks source link

Reorganize batching #54

Closed cthoyt closed 2 years ago

cthoyt commented 2 years ago

Summary

Currently, there are a few classes that mediate generation of DrugPairBatch objects. This PR does a big overhaul to simplify that code. Most importantly, it tries to shy away from the java-style coding of creating an object then immediately after putting stuff inside it (now just make the object with the stuff in the first place)

Changes

Next Steps

After this PR is merged, the next steps are to greatly simplify the context and drug feature set classes as well as impose mypy testing (currently the way they subclass dictionary is problematic)

benedekrozemberczki commented 2 years ago

Thank you @cthoyt!