Update optuna_dashboard/preferential/_study.py

Co-authored-by: c-bata <c-bata@users.noreply.github.com>
This commit is contained in:
contramundum53
2023-09-06 11:24:00 +09:00
committed by GitHub
co-authored by c-bata
parent 11cf11e589
commit 965673c839
+4 -18
View File
@@ -193,26 +193,12 @@ class PreferentialStudy:
You can fix the next sampling parameters which will be evaluated in your
objective function.
Example:
.. seealso::
.. testcode::
See `Study.enqueue_trials`_ for details.
import optuna
def objective(trial):
x = trial.suggest_float("x", 0, 10)
return x**2
study = optuna.create_study()
study.enqueue_trial({"x": 5})
study.enqueue_trial({"x": 0}, user_attrs={"memo": "optimal"})
study.optimize(objective, n_trials=2)
assert study.trials[0].params == {"x": 5}
assert study.trials[1].params == {"x": 0}
assert study.trials[1].user_attrs == {"memo": "optimal"}
.. _Study.get_trials: https://optuna.readthedocs.io/en/stable/reference/\
generated/optuna.study.Study.html#optuna.study.Study.enqueue_trials
Args:
params: