From: Jérôme Benoit Date: Fri, 14 Feb 2025 21:30:31 +0000 (+0100) Subject: refactor(qav3): log more information at optuna failure X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=52d3ee4689e0db2ce5ebeb0bcc3aaba3bf8443b7;p=freqai-strategies.git refactor(qav3): log more information at optuna failure Signed-off-by: Jérôme Benoit --- diff --git a/quickadapter/user_data/freqaimodels/LightGBMRegressorQuickAdapterV35.py b/quickadapter/user_data/freqaimodels/LightGBMRegressorQuickAdapterV35.py index c14e396..b4685ba 100644 --- a/quickadapter/user_data/freqaimodels/LightGBMRegressorQuickAdapterV35.py +++ b/quickadapter/user_data/freqaimodels/LightGBMRegressorQuickAdapterV35.py @@ -286,9 +286,7 @@ class LightGBMRegressorQuickAdapterV35(BaseRegressionModel): gc_after_trial=True, ) except Exception as e: - logger.error( - f"Optuna hyperopt failed: {e}. Consider using a concurrency friendly storage backend like 'file' or lower the number of jobs." - ) + logger.error(f"Optuna hyperopt failed: {e}", exc_info=True) hyperopt_failed = True if not hyperopt_failed: diff --git a/quickadapter/user_data/freqaimodels/XGBoostRegressorQuickAdapterV35.py b/quickadapter/user_data/freqaimodels/XGBoostRegressorQuickAdapterV35.py index 3c6cb57..ae8e0b0 100644 --- a/quickadapter/user_data/freqaimodels/XGBoostRegressorQuickAdapterV35.py +++ b/quickadapter/user_data/freqaimodels/XGBoostRegressorQuickAdapterV35.py @@ -289,9 +289,7 @@ class XGBoostRegressorQuickAdapterV35(BaseRegressionModel): gc_after_trial=True, ) except Exception as e: - logger.error( - f"Optuna hyperopt failed: {e}. Consider using a concurrency friendly storage backend like 'file' or lower the number of jobs." - ) + logger.error(f"Optuna hyperopt failed: {e}", exc_info=True) hyperopt_failed = True if not hyperopt_failed: diff --git a/quickadapter/user_data/strategies/QuickAdapterV3.py b/quickadapter/user_data/strategies/QuickAdapterV3.py index 651ab18..a5b4e8c 100644 --- a/quickadapter/user_data/strategies/QuickAdapterV3.py +++ b/quickadapter/user_data/strategies/QuickAdapterV3.py @@ -69,21 +69,23 @@ class QuickAdapterV3(IStrategy): can_short = False - plot_config = { - "main_plot": {}, - "subplots": { - "accuracy": {"rmse": {"color": "#c28ce3", "type": "line"}}, - "extrema": { - EXTREMA_COLUMN: {"color": "#f53580", "type": "line"}, - MINIMA_THRESHOLD_COLUMN: {"color": "#4ae747", "type": "line"}, - MAXIMA_THRESHOLD_COLUMN: {"color": "#e6be0b", "type": "line"}, - }, - "min_max": { - "maxima": {"color": "#0dd6de", "type": "bar"}, - "minima": {"color": "#e3970b", "type": "bar"}, + @property + def plot_config(self): + return { + "main_plot": {}, + "subplots": { + "accuracy": {"rmse": {"color": "#c28ce3", "type": "line"}}, + "extrema": { + EXTREMA_COLUMN: {"color": "#f53580", "type": "line"}, + MINIMA_THRESHOLD_COLUMN: {"color": "#4ae747", "type": "line"}, + MAXIMA_THRESHOLD_COLUMN: {"color": "#e6be0b", "type": "line"}, + }, + "min_max": { + "maxima": {"color": "#0dd6de", "type": "bar"}, + "minima": {"color": "#e3970b", "type": "bar"}, + }, }, - }, - } + } @property def protections(self):