remove decimal module
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# from skopt.space import Categorical, Dimension, Integer, Real # noqa: F401
|
# from skopt.space import Categorical, Dimension, Integer, Real # noqa: F401
|
||||||
from .decimalspace import SKDecimal # noqa: F401
|
from .decimalspace import SKDecimal # noqa: F401
|
||||||
from .optunaspaces import DimensionProtocol # noqa: F401
|
from .optunaspaces import DimensionProtocol as Dimension # noqa: F401
|
||||||
from .optunaspaces import ft_CategoricalDistribution as Categorical # noqa: F401
|
from .optunaspaces import ft_CategoricalDistribution as Categorical # noqa: F401
|
||||||
from .optunaspaces import ft_FloatDistribution as Real # noqa: F401
|
from .optunaspaces import ft_FloatDistribution as Real # noqa: F401
|
||||||
from .optunaspaces import ft_IntDistribution as Integer # noqa: F401
|
from .optunaspaces import ft_IntDistribution as Integer # noqa: F401
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
from decimal import Decimal
|
|
||||||
|
|
||||||
from optuna.distributions import FloatDistribution
|
from optuna.distributions import FloatDistribution
|
||||||
|
|
||||||
|
|
||||||
@@ -9,7 +7,7 @@ class SKDecimal(FloatDistribution):
|
|||||||
low: float,
|
low: float,
|
||||||
high: float,
|
high: float,
|
||||||
step: float | None = None,
|
step: float | None = None,
|
||||||
decimals: int = 4,
|
decimals: int = 3,
|
||||||
name=None,
|
name=None,
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
@@ -21,7 +19,6 @@ class SKDecimal(FloatDistribution):
|
|||||||
self.step = step or 1 / 10**decimals
|
self.step = step or 1 / 10**decimals
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
||||||
# with localcontext(prec=max(decimals, 4)) as ctx:
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
low=low,
|
low=low,
|
||||||
high=high,
|
high=high,
|
||||||
|
|||||||
Reference in New Issue
Block a user