Commit 1570ff7
committed
[tune] Require optuna>=3.0.0 in OptunaSearch
OptunaSearch already requires the Optuna 3.0+ distributions API: it
unconditionally builds optuna.distributions.FloatDistribution during
search-space conversion. On older Optuna it fails with a confusing
AttributeError instead of a clear message.
This codifies the already-required minimum:
- Raise a clear ImportError when optuna<3.0.0, mirroring the existing
XGBoostTrainer version guard.
- Remove the unreachable MOTPESampler (<2.9.0) branch; default to
TPESampler, which handles single- and multi-objective optimization.
- Update the docstring: drop the stale MOTPESampler/2.10.0 text and note
that OptunaSearch requires optuna>=3.0.
The Tune Optuna example already assumes and installs optuna>=3.0.0.
Part of #60512.
Signed-off-by: Adel Nour <ans9868@nyu.edu>1 parent 51971fa commit 1570ff7
1 file changed
Lines changed: 11 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| |||
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
130 | | - | |
131 | | - | |
132 | | - | |
| 133 | + | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | 137 | | |
145 | 138 | | |
146 | 139 | | |
| |||
340 | 333 | | |
341 | 334 | | |
342 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
343 | 341 | | |
344 | 342 | | |
345 | 343 | | |
| |||
408 | 406 | | |
409 | 407 | | |
410 | 408 | | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | 409 | | |
| 410 | + | |
417 | 411 | | |
418 | 412 | | |
419 | 413 | | |
| |||
0 commit comments