-
Notifications
You must be signed in to change notification settings - Fork 20
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
BOHB implementation #54
Conversation
CI failed due to the library haven't been registered, waiting for that. |
Very cool, thanks for this PR! I'll try to take some time to review it before the weekend 😃 |
README.md
Outdated
end | ||
``` | ||
|
||
<!-- ### Empirical Result <sub><sup>[[code]](https://github.com/noil-reed/notebooks/blob/main/BOHB_demo/demo.ipynb)</sub></sup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment supposed to be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, sorry about the comment stuff. I'll remove them
src/samplers.jl
Outdated
else | ||
ele = rand(1:dim_type.levels) | ||
end | ||
elseif dim_type isa MultiKDE.UnorderedCategoricalDim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case appears to have logic identical to the case above?
MultiKDE.KDEMulti(dims, observations, candidates) | ||
end | ||
|
||
function Base.getproperty(dim_type::Union{MultiKDE.CategoricalDim, MultiKDE.UnorderedCategoricalDim}, v::Symbol) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this method do? It simply calls getfield
no matter what argument is supplied?
test/BOHB.jl
Outdated
end | ||
|
||
# extra robust option | ||
@macroexpand @hyperopt for i=18, sampler=Hyperband(R=50, η=3, inner=BOHB(dims=[Hyperopt.UnorderedCategorical(5), Hyperopt.Continuous(), Hyperopt.Continuous()])), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do? Why the @macroexpand
?
@@ -53,12 +53,14 @@ f(a,b=true;c=10) = sum(@. 100 + (a-3)^2 + (b ? 10 : 20) + (c-100)^2) # This func | |||
@test length(hol.results) == 200 | |||
|
|||
|
|||
hocl = @hyperopt for i=100, sampler=CLHSampler(dims=[Continuous(),Categorical(2),Continuous()]), a = LinRange(1,5,100), b = [true, false], c = exp10.(LinRange(-1,3,100)) | |||
# hocl = @hyperopt for i=100, sampler=CLHSampler(dims=[Hyperopt.ContinuousDim(),Hyperopt.CategoricalDim(2),Hyperopt.ContinuousDim()]), a = LinRange(1,5,100), b = [true, false], c = exp10.(LinRange(-1,3,100)) | |||
hocl = @hyperopt for i=100, sampler=CLHSampler(dims=[Hyperopt.Continuous(),Hyperopt.Categorical(2),Hyperopt.Continuous()]), a = LinRange(1,5,100), b = [true, false], c = exp10.(LinRange(-1,3,100)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the Hyperopt.
here? these names are exported by Hyperopt
# println(i, "\t", a, "\t", b, "\t", c) | ||
f(a,b,c=c) | ||
end | ||
@test minimum(hocl) < 300 | ||
@hyperopt for i=100, ho = hocl, sampler=CLHSampler(dims=[Continuous(),Categorical(2),Continuous()]), a = LinRange(1,5,100), b = [true, false], c = exp10.(LinRange(-1,3,100)) | ||
# @hyperopt for i=100, ho = hocl, sampler=CLHSampler(dims=[Hyperopt.ContinuousDim(),Hyperopt.CategoricalDim(2),Hyperopt.ContinuousDim()]), a = LinRange(1,5,100), b = [true, false], c = exp10.(LinRange(-1,3,100)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can these comments be cleared up?
doesn't run with the extra comma
I've tried to add some changes and squash the commits in the branch down to a single commit, but I can't make git associate the commit with you if I do. May I ask you to squash these commits down to one? That way I can add my changes on top of that commit and still have git associate the contribution of the code to you. |
If you're not comfortable with git squash/rebase (I can't claim to be) the perhaps easiest way to do this is to create a new branch off of |
Thank you so much Fredrik! I'll deal with it as soon as possible! |
Hi Fredrik I just squashed the commits, I saw your fixes, thanks for that. |
Thanks! I'll be out of office for a week or so, will merge when I get back. Thanks for your work on this 😊 |
just curious if there's any update on this PR? |
I'm on vacation and will not have time to test and merge it for at least another week. |
BOHB implementation