From 592588e12b69b116d1f392c014d368b59123e0e8 Mon Sep 17 00:00:00 2001 From: rozetko Date: Thu, 30 Aug 2018 14:15:59 +0300 Subject: [PATCH] Hotfix: return cache from pattern_detector.train --- analytics/detectors/pattern_detector.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/analytics/detectors/pattern_detector.py b/analytics/detectors/pattern_detector.py index 06147d4..f8d4506 100644 --- a/analytics/detectors/pattern_detector.py +++ b/analytics/detectors/pattern_detector.py @@ -34,7 +34,9 @@ class PatternDetector(Detector): # TODO: pass only part of dataframe that has segments self.model.fit(dataframe, segments, cache) # TODO: save model after fit - return cache + return { + 'cache': cache + } async def predict(self, dataframe: pd.DataFrame, cache: dict): predicted = await self.model.predict(dataframe, cache)