Preemptible instances support of `optuna tell`.
See original GitHub issueMotivation
When using optuna ask&tell on preemptible instances, optuna tell
can raise RuntimeError
on preemption because the trial can be already in one of finished state
after preemption.
... # Some codes
optuna tell --storage $OPTUNA_STORAGE --study-name mystudy --trial-number 0 --values 1.0 # error in the second run
# <- preemption in the first run
... # Other codes
Description
Return a different exit code when the trial is already in a finished state
so that users can distinguish errors caused by preemption and others (e.g., connection error to DB).
Alternatives
- Check the trial’s state and values first and avoid calling
study.tell()
when the requested (state, values) are identical to the current value of the trial.- Concern: Comparison of values can be problematic due to precision issues of numerical values.
- Guide users to write python script and use
study.tell
+try-catch
on preemptible instances. (I’m currently using this.)
Additional context
I’m not quite sure a common way to handle this kind of situation and love to hear others’ voice.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Ask-and-Tell Interface — Optuna 3.0.5 documentation
Optuna has an Ask-and-Tell interface, which provides a more flexible interface for hyperparameter optimization. This tutorial explains three use-cases when ...
Read more >Running an Experiment - Kubeflow
This guide describes how to configure and run a Katib experiment. The experiment can perform hyperparameter tuning or a neural architecture ...
Read more >RubberBand: cloud-based hyperparameter tuning
It is worth noting that scheduling hyperparameter optimization jobs will not be considered as single job optimization, because it involves a ...
Read more >Optuna Guide: How to Monitor Hyper-Parameter Optimization ...
For k hyper-parameters, after N experiments, we use the best, say, 25% of the trials (best here is decided according to the metric...
Read more >University of Groningen Text Similarity Between Concepts Extracted ...
support, sponsorship, and collaboration from Springer LNCS are also greatly ... percentage between the number of instances of the most represented class and....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It should be easy to implement, let me work on that.
Thank you for creating the PR! Let me take a look.