From 125085fbaf38713e11a4657a20b2cc7833553ed9 Mon Sep 17 00:00:00 2001 From: Yinon Polak Date: Mon, 6 Mar 2023 18:10:49 +0200 Subject: [PATCH] add freqai.model_exists pytorch file type support --- freqtrade/freqai/freqai_interface.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freqtrade/freqai/freqai_interface.py b/freqtrade/freqai/freqai_interface.py index 884849446..79bd7d672 100644 --- a/freqtrade/freqai/freqai_interface.py +++ b/freqtrade/freqai/freqai_interface.py @@ -563,8 +563,11 @@ class IFreqaiModel(ABC): file_type = ".joblib" elif self.dd.model_type == 'keras': file_type = ".h5" - elif 'stable_baselines' in self.dd.model_type or 'sb3_contrib' == self.dd.model_type: + elif ('stable_baselines' in self.dd.model_type or + 'sb3_contrib' == self.dd.model_type or + 'pytorch' == self.dd.model_type): file_type = ".zip" + path_to_modelfile = Path(dk.data_path / f"{dk.model_filename}_model{file_type}") file_exists = path_to_modelfile.is_file() if file_exists: