From: Vsevolod Stakhov Date: Tue, 9 Jul 2019 16:46:34 +0000 (+0100) Subject: [Minor] Do not store serialized ANN X-Git-Tag: 2.0~615 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae98b4491585045b0f8655d8335c8044cea15280;p=thirdparty%2Frspamd.git [Minor] Do not store serialized ANN --- diff --git a/src/plugins/lua/neural.lua b/src/plugins/lua/neural.lua index 815e1ddf06..b88890c249 100644 --- a/src/plugins/lua/neural.lua +++ b/src/plugins/lua/neural.lua @@ -789,7 +789,6 @@ local function load_new_ann(rule, ev_base, set, profile, min_diff) if ann then set.ann = { - ann = ann, version = profile.version, symbols = profile.symbols, distance = min_diff, @@ -798,6 +797,7 @@ local function load_new_ann(rule, ev_base, set, profile, min_diff) local ucl = require "ucl" local profile_serialized = ucl.to_format(profile, 'json-compact', true) + profile.ann = ann -- To avoid serialization local function rank_cb(_, _) -- TODO: maybe add some logging