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

Fix optuna callback #190

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Fix optuna callback #190

merged 1 commit into from
Apr 12, 2024

Conversation

nhuet
Copy link
Contributor

@nhuet nhuet commented Apr 11, 2024

Optuna callback was relying on ResultStorage.best_fit to get the current best fitness. But this property is correctly filled only if the result_storage has been filled using add_solution(). And lost of solvers actually directly append solutions to the attribute ResultSorage.list_solution_fits.

So we rather use ResultStorage_get_best_solution_fit() which works always.

Optuna callback was relying on `ResultStorage.best_fit` to get the current
best fitness. But this property is correctly filled only if the
result_storage has been filled using `add_solution()`.
And lost of solvers actually directly append solutions to the attribute
`ResultSorage.list_solution_fits`.

So we rather use `ResultStorage_get_best_solution_fit()` which works
always.
Copy link
Collaborator

@g-poveda g-poveda left a comment

Choose a reason for hiding this comment

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

Ok

@g-poveda g-poveda merged commit 16f2fb7 into airbus:master Apr 12, 2024
14 checks passed
@nhuet nhuet deleted the fix-optuna branch April 19, 2024 08:58
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