optuna
optuna copied to clipboard
Refactor `_tell.py`
Motivation
The implementation of _tell.py
is complicated, which causes bugs (#3808, #3814, #3819). This PR adds private methods and simplifies _tell_with_warning
.
Description of the changes
- Add
_get_frozen_trial
and_check_state_and_values
methods - Change
_check_and_convert_to_values
to_check_values
@knshnb @contramundum53 Could you review this PR?
@HideakiImamura Should this be merged before v3?
Codecov Report
Merging #3841 (6f7dc7a) into master (ae7e309) will increase coverage by
0.02%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #3841 +/- ##
==========================================
+ Coverage 90.57% 90.60% +0.02%
==========================================
Files 167 167
Lines 13111 13109 -2
==========================================
+ Hits 11875 11877 +2
+ Misses 1236 1232 -4
Impacted Files | Coverage Δ | |
---|---|---|
optuna/study/_optimize.py | 98.44% <ø> (ø) |
|
optuna/study/study.py | 94.53% <ø> (ø) |
|
optuna/study/_tell.py | 100.00% <100.00%> (+2.00%) |
:arrow_up: |
optuna/samplers/_qmc.py | 95.14% <0.00%> (+0.04%) |
:arrow_up: |
optuna/integration/botorch.py | 98.25% <0.00%> (+0.87%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
This pull request has not seen any recent activity.
This pull request has not seen any recent activity.
Thank you for the detailed review. I addressed your comments. PTAL.
Thanks for the update! Almost LGTM, but you dropped the cast to float
of each element of values
by this commit?
Thank you. Fixed.