From edda8420f9a8ae98b4beb36ae927f5a140049928 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 31 Jul 2025 18:37:31 +0200 Subject: [PATCH] refactor(qav3): type cast some tunables MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../user_data/freqaimodels/QuickAdapterRegressorV3.py | 6 +++--- quickadapter/user_data/strategies/QuickAdapterV3.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py index 097f78b..a9986a8 100644 --- a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py +++ b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py @@ -288,7 +288,7 @@ class QuickAdapterRegressorV3(BaseRegressionModel): namespace="hp", objective=lambda trial: hp_objective( trial, - self.freqai_info.get("regressor", "xgboost"), + str(self.freqai_info.get("regressor", "xgboost")), X, y, train_weights, @@ -314,7 +314,7 @@ class QuickAdapterRegressorV3(BaseRegressionModel): namespace="train", objective=lambda trial: train_objective( trial, - self.freqai_info.get("regressor", "xgboost"), + str(self.freqai_info.get("regressor", "xgboost")), X, y, train_weights, @@ -348,7 +348,7 @@ class QuickAdapterRegressorV3(BaseRegressionModel): eval_set, eval_weights = self.eval_set_and_weights(X_test, y_test, test_weights) model = fit_regressor( - regressor=self.freqai_info.get("regressor", "xgboost"), + regressor=str(self.freqai_info.get("regressor", "xgboost")), X=X, y=y, train_weights=train_weights, diff --git a/quickadapter/user_data/strategies/QuickAdapterV3.py b/quickadapter/user_data/strategies/QuickAdapterV3.py index 1445896..60438c2 100644 --- a/quickadapter/user_data/strategies/QuickAdapterV3.py +++ b/quickadapter/user_data/strategies/QuickAdapterV3.py @@ -1000,9 +1000,9 @@ class QuickAdapterV3(IStrategy): series: Series, window: int, ) -> Series: - extrema_smoothing = self.freqai_info.get("extrema_smoothing", "gaussian") - extrema_smoothing_zero_phase = self.freqai_info.get( - "extrema_smoothing_zero_phase", True + extrema_smoothing = str(self.freqai_info.get("extrema_smoothing", "gaussian")) + extrema_smoothing_zero_phase = bool( + self.freqai_info.get("extrema_smoothing_zero_phase", True) ) std = derive_gaussian_std_from_window(window) extrema_smoothing_beta = float( -- 2.43.0