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

Add Optuna utilities to generate and run studies on single problem instance and multiple problem instances #227

Merged
merged 9 commits into from
Jun 11, 2024

Conversation

nhuet
Copy link
Contributor

@nhuet nhuet commented Jun 10, 2024

We provide generic functions to help create and run optuna studies

  • on a single problem, with generic_optuna_experiment_monoproblem(): this takes into account the latest examples added to examples/, and allow the possibility to report/prune according to elapsed time (meaningful when dealing with several unrelated solvers) or internal optimization step number
  • on several problems, with generic_optuna_experiment_multiproblem(): as the example provided in optuna doc for WilcoxonPruner, we report intermediate values and potentially prune after each instance resolution

These generic functions set default values for study name, journal log, ... and one should write its own script in order to have more control on all details.

nhuet added 4 commits June 10, 2024 12:15
- add a "high" value for each hyperparameter (can still be tuned in a specific
  study)
- when their are used as subbrick as only class, use subbrick_cls to
  avoid having a useless subbrick hyperparameter always set to ParamsConstraintBuilder
We rewrite the rcpsp optuna example on multiple instances and the
coloring optuna example with timed pruning by making use of these
new generic functions.
The dummy class will raise an error upon instantiation.
It allows the import of any module importing TimedPercentilePruner
without error but monly a warning.
@nhuet nhuet changed the title Optuna multiple instances Add Optuna utilities to generate and run studies on single problem instance and multiple problem instances Jun 10, 2024
nhuet added 5 commits June 11, 2024 09:56
- check_satisfy: wether or not checking that the solution does actually
  satisfy the problem
- prop_startup_instances: proportion of instances used to startup before allowing pruning.
- randomize_instances: whether randomizing instances order when running a trial.
- report_cumulated_fitness: whether reporting cumulated fitness instead of individual fitness for each problem instance.
It prevents meddling with best trial when pruning: if we are maximizing
negative fitnesses, the cumulative fitness is decreasing with number of
problem instances and thus should not be returned as the trial value
when pruned (since we are maximizing and this will always be greater
than if we had not pruned).
@nhuet nhuet force-pushed the optuna-multiple-instances branch from 418f51b to 89b8311 Compare June 11, 2024 14:33
@g-poveda g-poveda merged commit 0a53f8b into airbus:master Jun 11, 2024
14 checks passed
@nhuet nhuet deleted the optuna-multiple-instances branch July 11, 2024 08:50
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