From fedd54f06da0e9fb18a87f13b71f08cd9d0a8131 Mon Sep 17 00:00:00 2001 From: nabenabe0928 Date: Tue, 10 Dec 2024 17:57:28 +0100 Subject: [PATCH] Fix --- package/samplers/hebo/sampler.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/package/samplers/hebo/sampler.py b/package/samplers/hebo/sampler.py index 31ff9d79..f887d64f 100644 --- a/package/samplers/hebo/sampler.py +++ b/package/samplers/hebo/sampler.py @@ -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