-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement DeepDDS #53
Conversation
This branch obviously need more work, but for now I have this question:
Another comment: it would be nice to have the shapes/sized of the input data either available somewhere as importable constants or automatically set by the pipeline or some wrapper to the pipeline. I think @cthoyt is working on something along these lines in #52. |
What could be done is a parameter which deploys gat/gcn in the main model. That way you can test the model with various parameter settings in the tests and a single example enough. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you for your contribution. The molecular encoders could be parametrically deployed and that way you could switch between GCN and GAT.
chemicalx/models/deepdds.py
Outdated
:param dropout: | ||
""" | ||
super(DeepDDS, self).__init__() | ||
self.cell_mlp = MLP(input_dim=context_feature_size, hidden_dims=[2048, 512, context_output_size]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be parametrized.
I think the reason this is broken is the PackedGraph object has a shape of |
Max readout pools the vectors and creates something that is batch_size X dim. It is a scattering transform - a way to think about it is a group by aggregate where nodes are grouped together by the source graph. https://github.com/rusty1s/pytorch_scatter The figure here is pretty great. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. That failure of the CI on the default values is weird.
|
||
from .base import UnimplementedModel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is beautifully done.
|
||
__all__ = [ | ||
"DeepDDS", | ||
] | ||
|
||
|
||
class DeepDDS(UnimplementedModel): | ||
class DeepDDS(Model): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to mention both.
chemicalx/models/deepdds.py
Outdated
): | ||
"""Instantiate the DeepDDS model. | ||
|
||
:param context_feature_size: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very detailed.
dataset = DrugCombDB() | ||
model = DeepDDS( | ||
context_feature_size=dataset.context_channels, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
The failure is because there are only a subset of special parameters (i.e., |
@cthoyt Can I merge? |
Closes #19
Adds the DeepDDS model implementation
Changes
deepdds_examples.py
containing an example