molecule-generation icon indicating copy to clipboard operation
molecule-generation copied to clipboard

MoLeR inference server hangs on invalid SMILES

Open kmaziarz opened this issue 3 years ago • 0 comments

If MoLeRInferenceServer receives an invalid SMILES string (e.g. through molecule_generation encode), it just hangs, likely because the corresponding process failed, and the server ends up waiting for it indefinitely. This is far from ideal.

I see two kinds of behaviour we could aim for instead when encoding receives an invalid molecule:

  • The top-level process itself also fails with an exception.
  • The encoding carries on, returning None for the invalid molecules.

If possible, it could be nice to support both by having __init__ accept an fail_on_invalid_smiles: bool flag.

kmaziarz avatar Apr 29 '22 15:04 kmaziarz