Adding EntingStrategy tutorial for Suzuki-Miyaura Reaction#698
Adding EntingStrategy tutorial for Suzuki-Miyaura Reaction#698MrzvskK wants to merge 9 commits intoexperimental-design:mainfrom
Conversation
|
The errors are not stemming from this PR, there was a new pandas version published yesterday, and this seems to have problems with formulaic. @Osburg: can you have a look. In the meantime, I will push a PR which pins the pandas version. |
|
Thank you @jduerholt, I will also try to check with the team here at Imperial today, maybe we can find a solution. |
|
The fix is now applied, you can just merge main into your branch, then tests should be running again. |
jduerholt
left a comment
There was a problem hiding this comment.
Looks overall good, thank you. I let some comments. Can you also include the notebook in the overall documentation?
| print("\n🔬 STEP 2: Define Reaction Response Function") | ||
| print("-" * 80) | ||
|
|
||
| def suzuki_reaction_simulator(params: pd.Series) -> float: |
There was a problem hiding this comment.
Would be nice to add this suzuki_reaction_simulator to the benchmarks module of bofire: https://github.com/experimental-design/bofire/tree/main/bofire/benchmarks
There was a problem hiding this comment.
Would it be possible to accept current commit and resolve this and other requested changes here through an updated pull request later? I am afraid for the next two weeks I need to focus on other more urgent tasks.
| print(" time saturation, catalyst loading, synergistic interactions, and noise") | ||
| ``` | ||
|
|
||
| ### STEP 3: Generate Initial Screening Experiments |
There was a problem hiding this comment.
If you have the method as derived from the Benchmark class, then also the simulation etc. is much easier. Have also a look at other notebooks where benchmarks are executed.
| print("-" * 80) | ||
|
|
||
| # Import the strategy data model | ||
| from bofire.data_models.strategies.api import EntingStrategy as EntingStrategyDataModel |
There was a problem hiding this comment.
No need for using the data model, you can just use:
strategy = EntingStrategy.make(domain=domain, seed=42)
| print(f"{'Iter':<6} {'Solvent':<10} {'Base':<10} {'Temp':<8} {'Time':<8} {'Cat%':<8} {'Yield':<8} {'Best':<8}") | ||
| print("-" * 80) | ||
|
|
||
| n_iterations = 20 |
There was a problem hiding this comment.
Use here a smoke_test keyword for making it faster when executing it in the tests. Have a look at the other tutorials.
You could also use the official benchmark runner, then you would not need to do the loop explcitily. But do it as you want.
…_Reaction_Optimization.qmd Co-authored-by: Johannes P. Dürholt <johannespeter.duerholt@evonik.com>
|
I will have a look tmr ;=) |
|
Ok. let us put it in as is ( and to the rest later), but let's do two things?
|
|
@jduerholt, seems like with the enting strategy tutorial we run into gurobi issue. Do you have any ideas how we can have a workaround? |
Motivation
Hello,
I am new postdoc from Imperial in Ruth Misener team working on Bofire. I wanted to do a trial contribution before moving forward to bigger tasks.
As my first contribution I have created a tutorial for implementation of EntingStrategy bofire/strategies/predictives/enting.py. The enting was chosen primarily as there is no tutorial/example for using entmoot feature, which was added to bofire a few months ago.
This tutorial in detail implements EntingStrategy for optimization of Suzuki-Miyaura Reaction.
I have converted it into .qmd format, but there is also a python notebook to go with it if necessary.
Please let me know if there are ay question and comments,
Best Regards,
Kateryna
Have you read the Contributing Guidelines on pull requests?
Have you read the Contributing Guidelines on pull requests?
Yes, but I am still not certain if I did everything right.
(Write your answer here.)
Test Plan
I did not change any existing code - this is simply a new tutorial contribution that is based on the latest version of BoFire
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified that your changes work.)