Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nabenabe0928 committed Dec 10, 2024
1 parent 7ebafa6 commit adc56e6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions package/samplers/hebo/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,13 @@ def _convert_to_hebo_design_space(
config["lb"] = 0
config["ub"] = n_steps - 1
else:
config["type"] = "_".join(
[
"pow" if distribution.log else "",
"int" if isinstance(distribution, IntDistribution) else "num",
]
)
config["lb"] = distribution.low
config["ub"] = distribution.high
is_int = isinstance(distribution, IntDistribution)
if distribution.log:
config["type"] = "pow_int" if is_int else "pow"
else:
config["type"] = "int" if is_int else "num"
elif isinstance(distribution, CategoricalDistribution):
config["type"] = "cat"
config["categories"] = distribution.choices
Expand Down

0 comments on commit adc56e6

Please sign in to comment.