sustainable-processes / summit

Optimising chemical reactions using machine learning
https://gosummit.readthedocs.io/en/latest/
MIT License
118 stars 24 forks source link

Sweep: Don't retrain emulator on initialization #253

Closed marcosfelt closed 1 year ago

marcosfelt commented 1 year ago

ExperimentalEmulator should not be retrained on reinitialization (see summit/benchmarks/experimental_emulator.py). See:

https://github.com/sustainable-processes/summit/blob/8b987dee789eeb6e7e87184e935425330e2501f5/summit/benchmarks/experimental_emulator.py#L308-L317

sweep-ai[bot] commented 1 year ago

Hey @marcosfelt,

I've started working on this issue. It seems like the ExperimentalEmulator is not retraining the model during initialization. However, it might be getting retrained unnecessarily in other parts of the code where it's being used. I'm going to check the usage of ExperimentalEmulator in the tests and experiments to ensure it's not being retrained unnecessarily.

Give me a minute!

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/sustainable-processes/summit/blob/8b987dee789eeb6e7e87184e935425330e2501f5/experiments/cn_benchmark/test_cn_experiment_MO.py#L50-L74 https://github.com/sustainable-processes/summit/blob/8b987dee789eeb6e7e87184e935425330e2501f5/summit/tests/test_runner.py#L120-L162 https://github.com/sustainable-processes/summit/blob/8b987dee789eeb6e7e87184e935425330e2501f5/summit/run.py#L98-L124 https://github.com/sustainable-processes/summit/blob/8b987dee789eeb6e7e87184e935425330e2501f5/experiments/snar_benchmark/test_snar_experiment.py#L90-L132 https://github.com/sustainable-processes/summit/blob/8b987dee789eeb6e7e87184e935425330e2501f5/summit/tests/test_runner.py#L17-L90

I'm a bot that handles simple bugs and feature requests but I might make mistakes. Please be kind!

sweep-ai[bot] commented 1 year ago

Hey @marcosfelt,

I've started working on this issue. The plan is to modify the train method in the ExperimentalEmulator class to check if the model has already been trained. If it has, we'll skip the training process. This should prevent the emulator from being retrained on reinitialization.

Give me a minute!

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/sustainable-processes/summit/blob/8b987dee789eeb6e7e87184e935425330e2501f5/experiments/cn_benchmark/test_cn_experiment_MO.py#L50-L74 https://github.com/sustainable-processes/summit/blob/8b987dee789eeb6e7e87184e935425330e2501f5/summit/tests/test_runner.py#L120-L162 https://github.com/sustainable-processes/summit/blob/8b987dee789eeb6e7e87184e935425330e2501f5/summit/run.py#L98-L124 https://github.com/sustainable-processes/summit/blob/8b987dee789eeb6e7e87184e935425330e2501f5/experiments/snar_benchmark/test_snar_experiment.py#L90-L132 https://github.com/sustainable-processes/summit/blob/8b987dee789eeb6e7e87184e935425330e2501f5/summit/tests/test_runner.py#L17-L90

I'm a bot that handles simple bugs and feature requests but I might make mistakes. Please be kind!