Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Unify implementation of fast non-dominated sort #5160
Unify implementation of fast non-dominated sort #5160
Changes from 4 commits
b3fc441
63a9488
0e70a1f
319bce0
90fc55e
01cb145
9d358b4
43a9ae3
373903c
516e0ab
04385eb
a613050
a4cd1cd
b88d010
881009f
1bac8bd
a174c04
950fcc0
f5ae9d8
bd54538
a081ef0
cc46d17
a38e76e
51f4458
b484b28
8fcd160
13aa189
afac585
9876648
60ea231
a5c55e4
c6a96d7
37b043d
dfbb3dd
6593e16
70d5802
378c390
b6343d1
4bfe871
5c25571
e4f193e
3c6547b
7ae7855
a490277
542f011
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 132 in optuna/samplers/nsgaii/_elite_population_selection_strategy.py
optuna/samplers/nsgaii/_elite_population_selection_strategy.py#L132
Check warning on line 88 in optuna/study/_multi_objective.py
optuna/study/_multi_objective.py#L88
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.
As we can already bound
max(nondomination_rank)
byn_below
andnondomination_rank
ofn_below + 1
will not be used, so what about usingn_below + 1
?Another reason why we should probably avoid
-1
is that it might cause unexpected bugs in the future when some developers usenondomination_rank
being always better when it is lower.Plus, this implementation requires an ad-hoc handling of
nondomination_rank=-1
in each place where the function is used.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.
If we define
nondomination_rank
as:bottom_rank
becomesbottom_rank = np.max(ranks)
.Note that if
np.max(bottom_rank) = n_below + 1
, the processes hereafter simply define eachnondomination_rank
asn_below + <positive_integer>
, so they will be ignored.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 totally agree what you say but it makes this PR even larger. Can I split the task as a follow-up and resolve your comment in another PR?
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.
The suggestion is a little bit complicated, so I remarked the comment on #5089