Skip to content

fix: AIZynth#78

Open
finlayiainmaclean wants to merge 5 commits intov2from
finlay/aizynthv2
Open

fix: AIZynth#78
finlayiainmaclean wants to merge 5 commits intov2from
finlay/aizynthv2

Conversation

@finlayiainmaclean
Copy link
Copy Markdown
Collaborator

@finlayiainmaclean finlayiainmaclean commented Jul 24, 2025

This PR:

Fixes AIZynthFinder, by replacing the separate mamba env, and updating the config format.

@finlayiainmaclean finlayiainmaclean marked this pull request as draft July 24, 2025 17:44
setup.py Outdated
"func_timeout",
"flask"
"flask",
"aizynthfinder",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're now calling aizynth directly from the molscore env.

@MorganCThomas
Copy link
Copy Markdown
Owner

I was thinking of moving aizynthfinder to a flask server to remove MolScore dependencies. I.e., to keep it in a dedicated conda/mamba environment but have it running in flask to receive molecules and return scores.

I also wanted to move away from calling the aizynthfinder CLI line each time and run from the python API if possible, which will avoid model loading/unloading overhead.

@finlayiainmaclean
Copy link
Copy Markdown
Collaborator Author

I was thinking of moving aizynthfinder to a flask server to remove MolScore dependencies. I.e., to keep it in a dedicated conda/mamba environment but have it running in flask to receive molecules and return scores.

How would you like me to proceed? Shall I make a thin flask server and put it in molscore/servers, and change AIZynth scoring function to inherit from BaseServerSF (akin to how molscore/scoring_functions/legacy_qsar.py works)?

I also wanted to move away from calling the aizynthfinder CLI line each time and run from the python API if possible, which will avoid model loading/unloading overhead.

This PR does exactly this, loading self.finder = self._setup_finder() once per class instance.

@MorganCThomas
Copy link
Copy Markdown
Owner

How would you like me to proceed? Shall I make a thin flask server and put it in molscore/servers, and change AIZynth scoring function to inherit from BaseServerSF (akin to how molscore/scoring_functions/legacy_qsar.py works)?

Yes exactly this!

This PR does exactly this, loading self.finder = self._setup_finder() once per class instance.

Perfect! I hadn't seen the code proposed code changes yet, looks good.

@MorganCThomas MorganCThomas marked this pull request as ready for review September 5, 2025 20:32
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.

2 participants