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
Suppress warnings from numpy
in hypervolume computation
#5432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR, I left a minor comment!
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
In fact, this PR relates to the following issue's comment: Namely, we should probably return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the changes, I left a minor comment!
Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the change and the update in the unittest, LGTM!
assert not np.any(reference_point - rank_i_loss_vals <= 0) | ||
if not np.isfinite(reference_point).all(): | ||
return rank_i_indices[:subset_size] | ||
diff_of_loss_vals_and_ref_point = reference_point - rank_i_loss_vals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, can we revert here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the current defensive code is better for when _solve_hssp_on_unique_loss_vals
is called from other code in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then let's keep the current code!
@not522 |
Could you remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Motivation
I want to reduce warning
RuntimeWarning: invalid value encountered in subtract
in unittests.Related to issue #3815 .
Description of the changes
I applied
with np.errstate(invalid='ignore'):
to minimum extent necessary and suppressed warnings.