Merged
Conversation
c2b7f4e to
fe65e1b
Compare
Contributor
|
This pull request has not seen any recent activity. |
Member
|
@y0z Could you review this PR? |
Member
|
@porink0424 Could you review this PR? |
Contributor
|
This pull request has not seen any recent activity. |
Contributor
|
This pull request has not seen any recent activity. |
y0z
reviewed
Jan 23, 2025
Member
y0z
left a comment
There was a problem hiding this comment.
I leave some comments on _base.py.
y0z
reviewed
Jan 24, 2025
| return [study._storage.get_trial(trial_id) for trial_id in cached_parent_population] | ||
| else: | ||
| parent_population = self.select_parent(study, generation) | ||
| study._storage.set_study_system_attr( |
b794be9 to
dcf1b9b
Compare
porink0424
reviewed
Jan 29, 2025
Member
porink0424
left a comment
There was a problem hiding this comment.
I've left a few comments, please take a look.
dcf1b9b to
762a365
Compare
porink0424
reviewed
Jan 29, 2025
93d183c to
da06dc9
Compare
- `get_generation` -> `get_trial_generation` - Remove "current" word from "current generation" because of ambiguity
97ccb5c to
0f2dd05
Compare
- Use `get_trials` to preetch all the trials to avoid unnecessary execution of SQL queries - Fix the test of BaseGASampler
0f2dd05 to
1522dcd
Compare
Contributor
|
This pull request has not seen any recent activity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
In optuna GA (Genetic Algorithm) samplers are not easy to implement, this is because each sampler should handle generation id and caches correctly.
So for easy implementation. I implemented the abstract class of the GASampler
BaseGASamplerfor general GA.There are also some bugs in the current implementation.
The nsgaii sampler stopped with a random multiprocess error at this line.
Performance
I created a simple benchmark with the following simple objective function.
Run with in-memory storage and 3000 trials. Repeated 20 times. And the results are as follows
Description of the changes
BaseGASampler.BaseGASampler.