From: Dmitriy Alekseev <1865999+dragoangel@users.noreply.github.com> Date: Fri, 9 Jan 2026 19:23:47 +0000 (+0100) Subject: [Neural] Add option to skip training if store_set_only is true X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1a6b82864a7f92eaad70b0cb9f819a995cf8a71;p=thirdparty%2Frspamd.git [Neural] Add option to skip training if store_set_only is true --- diff --git a/src/plugins/lua/neural.lua b/src/plugins/lua/neural.lua index 8d9859f8a9..f158e035ff 100644 --- a/src/plugins/lua/neural.lua +++ b/src/plugins/lua/neural.lua @@ -401,6 +401,12 @@ end -- * Loads spam and ham vectors -- * Spawn learning process local function do_train_ann(worker, ev_base, rule, set, ann_key) + -- Check if we need to train ann + if set.store_set_only then + lua_util.debugm(N, rspamd_config, 'do_train_ann: skipping %s:%s key=%s due to store_set_only', rule.prefix, set.name, ann_key) + return + end + local spam_elts = {} local ham_elts = {} lua_util.debugm(N, rspamd_config, 'do_train_ann: start for %s:%s key=%s', rule.prefix, set.name, ann_key)