AstraZeneca / chemicalx

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

Expose dataset properties #52

Closed cthoyt closed 2 years ago

cthoyt commented 2 years ago

Summary

It wasn't clear where the magic parameter numbers came from in the existing two examples - it turns out that a few of the inputs to a given model need to come from the dataset. This PR standardizes the names of those parameters and makes them easier to get from an instance of a dataset by exposing them as python properties

Changes

cthoyt commented 2 years ago

Alright the issue with the torchdrug widths was solved by adding a constant.

codecov-commenter commented 2 years ago

Codecov Report

Merging #52 (2292b4a) into main (8fdd199) will decrease coverage by 0.60%. The diff coverage is 88.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
- Coverage   98.45%   97.84%   -0.61%     
==========================================
  Files          27       28       +1     
  Lines         712      744      +32     
==========================================
+ Hits          701      728      +27     
- Misses         11       16       +5     
Impacted Files Coverage Δ
chemicalx/models/__init__.py 100.00% <ø> (ø)
chemicalx/models/deepsynergy.py 100.00% <ø> (ø)
chemicalx/data/labeledtriples.py 97.87% <50.00%> (-2.13%) :arrow_down:
chemicalx/data/datasetloader.py 90.78% <81.81%> (-3.95%) :arrow_down:
chemicalx/constants.py 100.00% <100.00%> (ø)
chemicalx/models/epgcnds.py 100.00% <100.00%> (ø)
tests/unit/test_models.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8fdd199...2292b4a. Read the comment docs.