Skip to content

Implement MatchMaker model#67

Merged
benedekrozemberczki merged 8 commits intoAstraZeneca:mainfrom
andrejlamov:matchmaker
Feb 1, 2022
Merged

Implement MatchMaker model#67
benedekrozemberczki merged 8 commits intoAstraZeneca:mainfrom
andrejlamov:matchmaker

Conversation

@andrejlamov
Copy link
Contributor

@andrejlamov andrejlamov commented Feb 1, 2022

Summary

Closes #23

  • Unit tests provided for these changes
  • Documentation and docstrings added for these changes

Changes

Implement the MatchMaker model.

"""

# The left drug
hidden_left = torch.cat([context_features, drug_features_left], dim=1)
Copy link
Contributor

@cthoyt cthoyt Feb 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since the code is exactly duplicated between the left and right drug (besides the input), consider splitting this into a helper function

@cthoyt
Copy link
Contributor

cthoyt commented Feb 1, 2022

Please run tox -re lint locally to make sure that you use the newest version of black for code reformatting

@codecov-commenter
Copy link

codecov-commenter commented Feb 1, 2022

Codecov Report

Merging #67 (5133f74) into main (a2fb02f) will increase coverage by 0.22%.
The diff coverage is 98.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #67      +/-   ##
==========================================
+ Coverage   93.75%   93.97%   +0.22%     
==========================================
  Files          29       29              
  Lines         800      846      +46     
==========================================
+ Hits          750      795      +45     
- Misses         50       51       +1     
Impacted Files Coverage Δ
chemicalx/models/matchmaker.py 97.50% <97.43%> (-2.50%) ⬇️
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 a2fb02f...5133f74. Read the comment docs.

:param out_channels: The number of output channels.
:param dropout_rate: The rate of dropout before the scoring head is used.
"""

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove blank line (please read CI results carefully or run tox -e flake8 locally)

@cthoyt cthoyt added the model label Feb 1, 2022
andrejlamov and others added 3 commits February 1, 2022 21:21
Co-authored-by: Charles Tapley Hoyt <cthoyt@gmail.com>
@benedekrozemberczki benedekrozemberczki marked this pull request as ready for review February 1, 2022 20:32
@cthoyt
Copy link
Contributor

cthoyt commented Feb 1, 2022

I'd like to push a few simplifications to this model before merge - like using some nn.Sequentials

@benedekrozemberczki benedekrozemberczki merged commit e025146 into AstraZeneca:main Feb 1, 2022
benedekrozemberczki added a commit that referenced this pull request Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the MatchMaker model

4 participants