gt4sd-core icon indicating copy to clipboard operation
gt4sd-core copied to clipboard

TorchDrug property optimization support

Open jannisborn opened this issue 2 years ago • 2 comments

Currently, our TorchDrug interface does support property optimization conceptually.

However, most runs will fail due to an underlying bug in TorchDrug that raises whenever there is only invalid SMILES in a batch, see https://github.com/DeepGraphLearning/torchdrug/issues/83

Once this is fixed in torchdrug and a new version is released on conda, we can enable our unittests (already written): https://github.com/gt4sd/gt4sd-core/blob/master/src/gt4sd/training_pipelines/tests/test_training_torchdrug_gcpn.py#L76

jannisborn avatar Apr 05 '22 06:04 jannisborn

Update: Updated to 0.1.3 and enabled the tests. They work fine but the inference pipelines are now failing with:

raise ValueError(
"Expect node attribute `%s` to have shape (%d, *), but found %s"
% (key, self.num_node, value.shape)
ValueError: Expect node attribute `atom_feature` to have shape (8, *), but found torch.Size([4, 18])

which never occurs in the first but only in the second iteration. Not sure what's going wrong but it's not because the models were trained on 0.1.2. I trained a dummy model on 0.1.3 and it has the same problem when used for inference.

jannisborn avatar Jun 10 '22 16:06 jannisborn

Moving forward, current issue was fixed in https://github.com/DeepGraphLearning/torchdrug/issues/117.

A new issue was arising when models generated only invalid molecules, I wrote a PR to fix, see: https://github.com/DeepGraphLearning/torchdrug/issues/125

jannisborn avatar Aug 15 '22 14:08 jannisborn