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 adc56e6 commit fedd54f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions package/samplers/hebo/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,13 @@ def _convert_to_hebo_design_space(
else:
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"
config["type"] = (
"pow_int" if isinstance(distribution, IntDistribution) else "pow"
)
else:
config["type"] = "int" if is_int else "num"
assert not isinstance(distribution, IntDistribution)
config["type"] = "num"
elif isinstance(distribution, CategoricalDistribution):
config["type"] = "cat"
config["categories"] = distribution.choices
Expand Down

0 comments on commit fedd54f

Please sign in to comment.