Open rajarshi opened 1 year ago
Hi @rajarshi,
Many thanks for testing our package out. This error seems to be related to a few RDKit descriptors not being able to be computed correctly - namely those from this module.
https://www.rdkit.org/docs/source/rdkit.Chem.EState.EState.html
I think there is little we can do here apart from removing these descriptors and retrain the default model - hoping that performance remains similar. Alternatively, could you please check for how many molecules in your set you cannot compute these descriptors and remove them before you pass them to the scorer?
EDIT: We'd like to catch these cases in the scorer nonetheless, so that we can return a nan value instead of crashing. Could you provide a example structure where this happens?
Could the code be updated to catch descriptor failures and skip that molecule (maybe logging the failures)
Unfortunately, I can't share the structures (also, it's not clear which structure is failing as that is not being logged)
Without having an example molecule where this happens, this is a bit hard to debug. We could try and catch the exception when computing the descriptors, but if you get a segfault this won't solve your issue.
Could you check whether you can avoid the segfault by setting num_workers=0
in the scorer?
One reasonable solution to failing descriptor calculations (this can always happen) is to have the training/application code catch the exceptions and insert a default value for each descriptor that fails. I normally use something that's clearly out of range and easy to recognize. @rajarshi this unfortunately doesn't help you, but you could add a pre-filter that catches molecules which throw exceptions during descriptor generation and prevents them from being passed to the model.
Hi - thanks for the nicely packaged code. I've been running it on some internal data so can't share the inputs data. The code I'm running is
However I see the follow errors - and as far as I can tell the input SMILES are all valid (they've been cleaned). Do you know what might cause this error?