return storage
@staticmethod
- def study_has_best_trial_params(study: Optional[Study]) -> bool:
+ def study_has_best_trial(study: Optional[Study]) -> bool:
if study is None:
return False
try:
- _ = study.best_trial.params
+ _ = study.best_trial
return True
# file backend storage raises KeyError
except KeyError:
)
hyperopt_failed = True
time_spent = time.time() - start
- if ReforceXY.study_has_best_trial_params(study) is False:
+ if ReforceXY.study_has_best_trial(study) is False:
logger.error(
- f"Hyperopt {study_name} failed ({time_spent:.2f} secs): no study best trial params found"
+ f"Hyperopt {study_name} failed ({time_spent:.2f} secs): no study best trial found"
)
hyperopt_failed = True
https://github.com/sponsors/robcaulk
"""
- version = "3.7.4"
+ version = "3.7.5"
@cached_property
def _optuna_config(self) -> dict:
time_spent = time.time() - start_time
if is_study_multi_objective is False:
- if not QuickAdapterRegressorV3.optuna_study_has_best_params(study):
+ if not QuickAdapterRegressorV3.optuna_study_has_best_trial(study):
logger.error(
- f"Optuna {pair} {namespace} {objective_type} hyperopt failed ({time_spent:.2f} secs): no study best params found"
+ f"Optuna {pair} {namespace} {objective_type} hyperopt failed ({time_spent:.2f} secs): no study best trial found"
)
return
self.set_optuna_rmse(pair, namespace, study.best_value)
return study
@staticmethod
- def optuna_study_has_best_params(study: Optional[optuna.study.Study]) -> bool:
+ def optuna_study_has_best_trial(study: Optional[optuna.study.Study]) -> bool:
if study is None:
return False
try:
- _ = study.best_params
+ _ = study.best_trial
return True
# file backend storage raises KeyError
except KeyError: