From 0306f5ca138449617438f8d8db17c34cbdaa688c Mon Sep 17 00:00:00 2001 From: robcaulk Date: Tue, 31 May 2022 11:58:21 +0200 Subject: [PATCH] Add autopurge feature so that FreqAI cleans up after itself when it no longer needs old models on disk --- docs/freqai.md | 15 +++++++++++ freqtrade/freqai/data_drawer.py | 39 ++++++++++++++++++++++++++++ freqtrade/freqai/data_kitchen.py | 2 +- freqtrade/freqai/freqai_interface.py | 9 +++++++ 4 files changed, 64 insertions(+), 1 deletion(-) diff --git a/docs/freqai.md b/docs/freqai.md index c4ac30415..fa2ca3724 100644 --- a/docs/freqai.md +++ b/docs/freqai.md @@ -423,6 +423,21 @@ by a leader with the same `identifier`. In this example, the user has a leader b `identifier: "example"` already running or launching simultaneously as the present follower. The follower will load models created by the leader and inference them to obtain predictions. +### Purging old model data + +FreqAI stores new model files each time it retrains. These files become obsolete as new models +are trained and FreqAI adapts to the new market conditions. Users planning to leave FreqAI running +for extended periods of time with high frequency retraining should set `purge_old_models` in their +config: + +```json + "freqai": { + "purge_old_models": true, + } +``` + +which will automatically purge all models older than the two most recently trained ones. +