]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
refactor(reforcexy): cleanup variable namespace
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 17 Feb 2025 11:47:42 +0000 (12:47 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 17 Feb 2025 11:47:42 +0000 (12:47 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
ReforceXY/user_data/freqaimodels/ReforceXY.py

index 31856163da353942b2c2599b7b88c05f98435e5f..d9ca43252b555af1978c13eb89b667f07dc3e08a 100644 (file)
@@ -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]