Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relaunch a simulation if it didn't run #587

Open
AndreaPi opened this issue Apr 17, 2024 · 1 comment
Open

Relaunch a simulation if it didn't run #587

AndreaPi opened this issue Apr 17, 2024 · 1 comment
Assignees

Comments

@AndreaPi
Copy link

AndreaPi commented Apr 17, 2024

I am using pymoo to find the optimal parameters for a datamatchin problem. In other words, I have a black box simulator getting parameters X as input, and returning values Y_pred as output, which need to match some ground truth experimental values Y. I cast this as an optimization problem, where

results['F'] = [np.mean(Y-Y_pred**2)]

The black box simulator is resource-intensive, so I use parallel computing. For various reasons, sometimes a simulation, ran with subprocess may time out even if it wasn't actually run, or if the run wasn't completed. In case of timeout, I'm able to catch the sp.TimeoutExpired exception.

  1. Is it possible to tell pymoo to skip an individual?
  2. If not, is it possible to retry the same individual once?

I don't want to assign the run a large penalty, e.g., results['F'] = 99999, because I'm not sure if the candidate was bad or not. In some cases, it may be possible that the simulation didn't run at all.

@AndreaPi AndreaPi changed the title Relaunch a simulation if it failed Relaunch a simulation if it didn't run Apr 17, 2024
@blankjul blankjul self-assigned this Apr 22, 2024
@blankjul
Copy link
Collaborator

What about simply using a try...catch.. in the problem evaluation?

you can in the catch part set your objective value to a large value or also implementy a retry strategy.

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

No branches or pull requests

2 participants