From 5fb963abbfe555c25c6e0b1f26a053f0727091a7 Mon Sep 17 00:00:00 2001 From: onerobotband <25308655+onerobotband@users.noreply.github.com> Date: Sun, 8 Feb 2026 11:42:31 +0000 Subject: [PATCH] Fix regex pattern for model folder matching Allows freqai to purge model train folders with non-alphanumeric characters in them (eg. hip3 pairs with hyphen) --- freqtrade/freqai/data_drawer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/freqai/data_drawer.py b/freqtrade/freqai/data_drawer.py index 7886bc896..2e381f981 100644 --- a/freqtrade/freqai/data_drawer.py +++ b/freqtrade/freqai/data_drawer.py @@ -446,7 +446,7 @@ class FreqaiDataDrawer: model_folders = [x for x in self.full_path.iterdir() if x.is_dir()] - pattern = re.compile(r"sub-train-(\w+)_(\d{10})") + pattern = re.compile(r"sub-train-([^_]+)_(\d{10})") delete_dict: dict[str, Any] = {}