Skip to content

Conversation

@NicklasOsterbacka
Copy link
Contributor

This PR adds a new stage parameter (max_smiles) that stops generation once the number of canonicalized generated SMILES reaches max_smiles. This also changes the behaviour of learning.py to add only valid SMILES to smiles_memory.

This allows for the running of the Practical Molecular Optimization benchmark through REINVENT4 by setting max_smiles to 10000.

@NicklasOsterbacka
Copy link
Contributor Author

NicklasOsterbacka commented Dec 5, 2025

I have additionally added a new terminator that stops execution after the top-k scores no longer improve after N epochs. This is primarily meant for the Practical Molecular Optimization benchmark in conjunction with unique SMILES-based early stopping, but might be interesting as a general alternative to checking mean scores as well.

I refactored the convergence check in learning.py to accommodate this change; it should in principle be a bit easier to extend it with more terminators, if need be. I also added two new stage parameters, topk and patience, as settings for the new terminator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant