Don't use _set_value for autoOpt-Spaces

This commit is contained in:
Matthias
2021-04-10 09:53:48 +02:00
parent 83fbaf16c8
commit 9804e20114
2 changed files with 3 additions and 11 deletions

View File

@@ -50,19 +50,11 @@ class BaseParameter(ABC):
return f'{self.__class__.__name__}({self.value})'
@abstractmethod
def get_space(self, name: str) -> Union['Integer', 'Real', 'Categorical']:
def get_space(self, name: str) -> Union['Integer', 'Real', 'SKDecimal', 'Categorical']:
"""
Get-space - will be used by Hyperopt to get the hyperopt Space
"""
def _set_value(self, value: Any):
"""
Update current value. Used by hyperopt functions for the purpose where optimization and
value spaces differ.
:param value: A numerical value.
"""
self.value = value
class NumericParameter(BaseParameter):
""" Internal parameter used for Numeric purposes """