Pass dimensions to generate_estimator

It's needed in order to create isotropic kernels for the GaussianProcessRegressor
This commit is contained in:
Italo 2022-01-19 01:07:41 +00:00
parent 301b2e8a0f
commit 407c20412d
3 changed files with 6 additions and 3 deletions

3
.gitignore vendored
View File

@ -100,3 +100,6 @@ target/
!config_examples/config_ftx.example.json !config_examples/config_ftx.example.json
!config_examples/config_full.example.json !config_examples/config_full.example.json
!config_examples/config_kraken.example.json !config_examples/config_kraken.example.json
docker-compose.yml
.DS_Store
user_data/data/.gitkeep

View File

@ -367,7 +367,7 @@ class Hyperopt:
} }
def get_optimizer(self, dimensions: List[Dimension], cpu_count) -> Optimizer: def get_optimizer(self, dimensions: List[Dimension], cpu_count) -> Optimizer:
estimator = self.custom_hyperopt.generate_estimator() estimator = self.custom_hyperopt.generate_estimator(dimensions)
acq_optimizer = "sampling" acq_optimizer = "sampling"
if isinstance(estimator, str): if isinstance(estimator, str):

View File

@ -91,5 +91,5 @@ class HyperOptAuto(IHyperOpt):
def trailing_space(self) -> List['Dimension']: def trailing_space(self) -> List['Dimension']:
return self._get_func('trailing_space')() return self._get_func('trailing_space')()
def generate_estimator(self) -> EstimatorType: def generate_estimator(self, dimensions) -> EstimatorType:
return self._get_func('generate_estimator')() return self._get_func('generate_estimator')(dimensions)