The hyperopt macro will look at each variable as a vector of somethings, and sample from the values in that vector as the variable. Look for example at
julia> ho = @hyperopt for i = 50,
a = [LinRange(1, 2, 10) for _ in 1:5], dummy=1
@show a
end
a = range(1.0, stop=2.0, length=10)
...
where you see that a is not a 5 long vector with values sampled from the 5 individual linranges, but it picks one of the 5 linranges as the variable.
It might be possible to do what you want with the macro, but then I think you would need to generate the product of all parameter spaces you have or something like this
ho = @hyperopt for i = 50,
a = collect(Iterators.product((LinRange(1, 2, 10) for _ in 1:5)...)),
dummy=1
@show a
end
which is doable if it is more convenient for you, but collecting that full parameter space might be large if you have a lot of parameters with a lot of possible values, so depending on that it might be simpler to just use another interface which can sample from the individual ones without the need of generating the full space.