-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix min window type check #523
Merged
till-m
merged 4 commits into
bayesian-optimization:master
from
phi-friday:fix-min-window-type-check
Oct 1, 2024
Merged
Fix min window type check #523
till-m
merged 4 commits into
bayesian-optimization:master
from
phi-friday:fix-min-window-type-check
Oct 1, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Give me some time to look into this :) |
You're right, this should not accept |
Should I modify it so that it doesn't accept |
it would be great if you remove the |
phi-friday
force-pushed
the
fix-min-window-type-check
branch
from
October 1, 2024 08:47
6eaeb5a
to
094c2ac
Compare
I fixed it. |
till-m
added a commit
to till-m/BayesianOptimization
that referenced
this pull request
Oct 9, 2024
* fix: import error from exception module (bayesian-optimization#525) * fix: replace list with sequence (bayesian-optimization#524) * Fix min window type check (bayesian-optimization#523) * fix: replace dict with Mapping * fix: replace list with Sequence * fix: add type hint * fix: does not accept None * Change docs badge (bayesian-optimization#527) * fix: parameter, target_space * fix: constraint, bayesian_optimization * fix: ParamsType --------- Co-authored-by: till-m <36440677+till-m@users.noreply.github.com>
till-m
added a commit
that referenced
this pull request
Dec 27, 2024
* WIP * Add ML example * Save for merge * Update * Parameter types more (#13) * fix: import error from exception module (#525) * fix: replace list with sequence (#524) * Fix min window type check (#523) * fix: replace dict with Mapping * fix: replace list with Sequence * fix: add type hint * fix: does not accept None * Change docs badge (#527) * fix: parameter, target_space * fix: constraint, bayesian_optimization * fix: ParamsType --------- Co-authored-by: till-m <36440677+till-m@users.noreply.github.com> * Use `.masks` not `._masks` * User `super` to call kernel * Update logging for parameters * Disable SDR when non-float parameters are present * Add demo script for typed optimization * Update parameters, testing * Remove sorting, gradient optimize only continuous params * Go back to `wrap_kernel` * Update code * Remove `tqdm` dependency, use EI acq * Add more text to typed optimization notebook. * Save files while moving device * Update with custom parameter type example * Mention that parameters are not sorted * Change array reg warning * Update Citations, parameter notebook --------- Co-authored-by: phi-friday <phi.friday@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
minimum_window
should be typechecked usingMapping
, notdict
.Also,
minimum_window_value
should be typechecked usingSequence
, notlist
.And I found it while checking it, is it possible for
minimum_window
to beNone
?The annotation and docstring on
minimum_window
don't match.Also, there doesn't seem to be any handling for the case where
minimum_window
isNone
inSequentialDomainReductionTransformer._trim()
.BayesianOptimization/bayes_opt/domain_reduction.py
Lines 211 to 212 in 10ef3be
In my opinion,
typing.Optional
was used to meanminimum_window
has a default value.BayesianOptimization/bayes_opt/domain_reduction.py
Line 56 in a6697aa
So it would be nice to add a process to
__init__
to either not acceptNone
, or to convert to the default value when it isNone
.