question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document how each sampler treat pruned trials and failed trials

See original GitHub issue

Motivated by useful discussions at https://github.com/optuna/optuna/issues/1552.

Motivation

How each sampler in Optuna treat pruned trials and failed trials is different depending on each sampler. It is kind for users to document how pruned or failed trials are processed when suggesting. I think it is a good idea to give the ..note:: section for each sampler’s docstrings.

For each sampler, the behavior is as follows.

optuna.samplers.RandomSampler & optuna.samplers.GridSampler & optuna.integration.PyCmaSampler

These samplers treat pruned trials and failed trials samely. They do not consider any pruned or failed trials. They simply ignore those trials.

optuna.samplers.TPESampler

This sampler treats pruned trials and failed trials differently. This sampler simply ignores failed trials. On the other hand, this sampler considers pruned trials to suggest the next parameters in each iteration. Concretely, This sampler makes a ranking of completed and pruned trials based on the pairs of the completed or pruned step and the evaluation value when completed or pruned. Then, this sampler suggests the next parameters according to the priority of the trial based on the ranking.

optuna.samplers.CmaEsSampler & optuna.integration.SkoptSampler

These samplers treat pruned trials and failed trials differently. This sampler simply ignores failed trials. On the other hand, this sampler considers pruned trials only when the consider_pruned_trials flag is True. When consider_pruned_trials = True, these samplers consider that pruned trials’ evaluation values are the evaluation values when pruned.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:10
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
HideakiImamuracommented, Aug 21, 2020

Oh! Thanks, @c-bata. Fixed.

0reactions
fsmoscacommented, Sep 2, 2021

I also observed that in SkoptSampler with considered_pruned_trials=True, the param of pruned trial is repeated. So there must be something with this considered_pruned_trials.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pruning Unpromising Trials — Optuna 2.0.0 documentation
Pruning Unpromising Trials¶. This feature automatically stops unpromising trials at the early stages of the training (a.k.a., automated early-stopping).
Read more >
optuna/optuna - Gitter
I'm trying to understand the pruning behavior for optuna when trials are persisted via storage. Say I have a study created and stored....
Read more >
Master protocol trials in oncology: Review and new trial designs
In order to understand the motivation and concept of clinical trial design using a master protocol, we first introduce the clinical trial ......
Read more >
Matching Methods - R Project
This vignette describes each matching method available in MatchIt and the ... weights and pruning of the sample are not direct functions of ......
Read more >
Categories, components, and techniques in a modular ...
Throughout this paper, we apply the latter wording, such that a basket trial consists of several baskets where each basket contains patients ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found