From: Jérôme Benoit Date: Mon, 17 Feb 2025 11:47:42 +0000 (+0100) Subject: refactor(reforcexy): cleanup variable namespace X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=783edd7dff44edd1714fc515f09205f7688d4bf5;p=freqai-strategies.git refactor(reforcexy): cleanup variable namespace Signed-off-by: Jérôme Benoit --- diff --git a/ReforceXY/user_data/freqaimodels/ReforceXY.py b/ReforceXY/user_data/freqaimodels/ReforceXY.py index 3185616..d9ca432 100644 --- a/ReforceXY/user_data/freqaimodels/ReforceXY.py +++ b/ReforceXY/user_data/freqaimodels/ReforceXY.py @@ -500,11 +500,11 @@ class ReforceXY(BaseReinforcementLearningModel): ) logger.info("---------------------------------------------") - best_trial_path = Path( + best_params_path = Path( dk.full_path / f"{dk.pair.split('/')[0]}_hyperopt_best_params.json" ) - logger.info("dumping to %s JSON file", best_trial_path) - with best_trial_path.open("w", encoding="utf-8") as write_file: + logger.info("dumping to %s JSON file", best_params_path) + with best_params_path.open("w", encoding="utf-8") as write_file: json.dump(study.best_trial.params, write_file, indent=4) return self.optuna_trial_params[dk.pair][study.best_trial.number]