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

Managing Objective Function Evaluation Failures in Ax for MOO #2574

Closed
Fa20 opened this issue Jul 10, 2024 · 6 comments
Closed

Managing Objective Function Evaluation Failures in Ax for MOO #2574

Fa20 opened this issue Jul 10, 2024 · 6 comments
Assignees

Comments

@Fa20
Copy link

Fa20 commented Jul 10, 2024

I'm using Ax to find the optimal solutions for a MOO problem. However, some suggested parameter values cause simulation failures, making it impossible to calculate the objective function. How can we avoid this in Ax? Specifically, how can we abandon these failed trials and obtain new suggestions? Can you provide an example of how to implement this?

@mpolson64 mpolson64 self-assigned this Jul 10, 2024
@mpolson64
Copy link
Contributor

Hi @Fa20 -- assuming you are using AxClient as we typically recommend take not of the trial that failed and simply call ax_client.log_trial_failed(trial_index) with the index of the trial that produced a simulation failure. After doing this you are free to generate new points using ax_client.get_next_trial() and continue the optimization.

@Fa20
Copy link
Author

Fa20 commented Jul 10, 2024

@mpolson64 thanks for your answer.

this will be not just one trial and may be many of this trial the simulation will be fallied with some of these suggested values of prams and I thought that using abandon will help not to repeat such these values later ?

@Fa20
Copy link
Author

Fa20 commented Jul 10, 2024

@mpolson64 is there any difference between ax_client.log_trial_failure(trial_index=trial_index) and ax_client.log_trial_failed(trial_index)

@Fa20
Copy link
Author

Fa20 commented Jul 10, 2024

@mpolson64 could you please keep the issue open since I do not think that is completed from my Side. Thank you so much
I did check and did not find ax_client.log_trial_failed(trial_index) could you please help?

@mpolson64
Copy link
Contributor

@Fa20 on this happening in multiple trials, you will need to repeatedly call ax_client.log_trial_failure(trial_index=n) for each trial that produces a simulation failure.

On FAILED versus ABANDONED, see #372 (comment) for a detailed explanation. In practice we see most of our users desire the FAILED behavior (i.e. treating errors as potentially transient and not blocking parameterizations from being re-suggested) so we provide the log_trial_failure method on AxClient to enable easy management. If you truly want the ABANDONED behavior you may do the following:

trial = ax_client.get_trial(trial_index=n)
trial.mark_abandoned()

To your question about the difference between ax_client.log_trial_failure(trial_index=trial_index) and ax_client.log_trial_failed(trial_index): This was a typo on my part -- log_trial_failure is the correct method to use.

@mpolson64 mpolson64 reopened this Jul 11, 2024
@mgarrard
Copy link
Contributor

Closing due to inactivity and a solution being proposed, please feel free to reopen :)

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

3 participants