From 5b5bb8aab5046c5ea6c3de01f4b319433997e76e Mon Sep 17 00:00:00 2001 From: robcaulk Date: Tue, 11 Oct 2022 19:05:46 +0200 Subject: [PATCH 1/3] catboost tensorboard bugfix --- freqtrade/freqai/data_kitchen.py | 1 - freqtrade/freqai/freqai_interface.py | 2 +- freqtrade/freqai/prediction_models/CatboostRegressor.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/freqtrade/freqai/data_kitchen.py b/freqtrade/freqai/data_kitchen.py index 89b8f2b95..4b604e281 100644 --- a/freqtrade/freqai/data_kitchen.py +++ b/freqtrade/freqai/data_kitchen.py @@ -119,7 +119,6 @@ class FreqaiDataKitchen: / f"sub-train-{pair.split('/')[0]}_{trained_timestamp}" ) - Path(self.data_path / 'tensorboard').mkdir(parents=True, exist_ok=True) return diff --git a/freqtrade/freqai/freqai_interface.py b/freqtrade/freqai/freqai_interface.py index ac980f5f1..9907a5f9f 100644 --- a/freqtrade/freqai/freqai_interface.py +++ b/freqtrade/freqai/freqai_interface.py @@ -201,10 +201,10 @@ class IFreqaiModel(ABC): new_trained_timerange, data_load_timerange, ) = dk.check_if_new_training_required(trained_timestamp) - dk.set_paths(pair, new_trained_timerange.stopts) if retrain: self.train_timer('start') + dk.set_paths(pair, new_trained_timerange.stopts) try: self.extract_data_and_train_model( new_trained_timerange, pair, strategy, dk, data_load_timerange diff --git a/freqtrade/freqai/prediction_models/CatboostRegressor.py b/freqtrade/freqai/prediction_models/CatboostRegressor.py index 46f33a142..2978f6679 100644 --- a/freqtrade/freqai/prediction_models/CatboostRegressor.py +++ b/freqtrade/freqai/prediction_models/CatboostRegressor.py @@ -43,7 +43,7 @@ class CatboostRegressor(BaseRegressionModel): model = CatBoostRegressor( allow_writing_files=True, - train_dir=Path(dk.data_path / 'tensorboard'), + train_dir=Path(dk.data_path), **self.model_training_parameters, ) From dba1b573bc773eb952c0830e52b4bf85f64cddf0 Mon Sep 17 00:00:00 2001 From: robcaulk Date: Tue, 11 Oct 2022 19:49:24 +0200 Subject: [PATCH 2/3] remove tensorboard dir from other pred models --- freqtrade/freqai/prediction_models/CatboostClassifier.py | 2 +- .../freqai/prediction_models/CatboostRegressorMultiTarget.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqai/prediction_models/CatboostClassifier.py b/freqtrade/freqai/prediction_models/CatboostClassifier.py index 6dab012d1..2aebc3ebf 100644 --- a/freqtrade/freqai/prediction_models/CatboostClassifier.py +++ b/freqtrade/freqai/prediction_models/CatboostClassifier.py @@ -34,7 +34,7 @@ class CatboostClassifier(BaseClassifierModel): cbr = CatBoostClassifier( allow_writing_files=True, loss_function='MultiClass', - train_dir=Path(dk.data_path / 'tensorboard'), + train_dir=Path(dk.data_path), **self.model_training_parameters, ) diff --git a/freqtrade/freqai/prediction_models/CatboostRegressorMultiTarget.py b/freqtrade/freqai/prediction_models/CatboostRegressorMultiTarget.py index 085c13b86..de7a73e3a 100644 --- a/freqtrade/freqai/prediction_models/CatboostRegressorMultiTarget.py +++ b/freqtrade/freqai/prediction_models/CatboostRegressorMultiTarget.py @@ -28,7 +28,7 @@ class CatboostRegressorMultiTarget(BaseRegressionModel): cbr = CatBoostRegressor( allow_writing_files=True, - train_dir=Path(dk.data_path / 'tensorboard'), + train_dir=Path(dk.data_path), **self.model_training_parameters, ) From 1e31be562e92a3e8629e918c285c4543cb7c0225 Mon Sep 17 00:00:00 2001 From: robcaulk Date: Tue, 11 Oct 2022 21:05:42 +0200 Subject: [PATCH 3/3] remove whitespace --- freqtrade/freqai/data_kitchen.py | 1 - 1 file changed, 1 deletion(-) diff --git a/freqtrade/freqai/data_kitchen.py b/freqtrade/freqai/data_kitchen.py index 4b604e281..52261d341 100644 --- a/freqtrade/freqai/data_kitchen.py +++ b/freqtrade/freqai/data_kitchen.py @@ -119,7 +119,6 @@ class FreqaiDataKitchen: / f"sub-train-{pair.split('/')[0]}_{trained_timestamp}" ) - return def make_train_test_datasets(