From 6eee72109470897ce1e5446b2b6a0a5e579e942a Mon Sep 17 00:00:00 2001 From: Anuj Solanki Date: Mon, 7 Oct 2024 02:04:00 +0530 Subject: Remove probability check and update dependencies - Removed self.classifier._check_proba() to avoid AttributeError for loss='log'. - Updated versions of scipy, numpy, and scikit-learn. Bug-AGL: SPEC-5200 Change-Id: I28b788b1c10f5c64ec8984b79073904f5be6f6a4 Signed-off-by: Anuj Solanki --- setup.py | 6 +++--- snips_inference_agl/intent_classifier/log_reg_classifier.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 92178e2..ad7faf2 100644 --- a/setup.py +++ b/setup.py @@ -16,13 +16,13 @@ with io.open(os.path.join(root, "snips_inference_agl", "__about__.py"), required = [ "deprecation>=2.0,<3.0", "future>=0.16,<0.18", - "numpy>=1.22.0,<1.22.4", + "numpy>=1.26.4", "num2words>=0.5.6,<0.6", "pyaml>=17.0,<20.0", "requests>=2.0,<3.0", - "scipy>=1.8.0,<1.9.0", + "scipy>=1.14.0", "threadpoolctl>=2.0.0", - "scikit-learn==0.24.2", + "scikit-learn>=1.4.2", "sklearn-crfsuite>=0.3.6,<0.4", "snips-nlu-parsers>=0.4.3,<0.4.4", "snips-nlu-utils>=0.9.1,<0.9.2", diff --git a/snips_inference_agl/intent_classifier/log_reg_classifier.py b/snips_inference_agl/intent_classifier/log_reg_classifier.py index 09e537c..f9322be 100644 --- a/snips_inference_agl/intent_classifier/log_reg_classifier.py +++ b/snips_inference_agl/intent_classifier/log_reg_classifier.py @@ -119,7 +119,7 @@ class LogRegIntentClassifier(IntentClassifier): def _predict_proba(self, X): # pylint: disable=C0103 import numpy as np - self.classifier._check_proba() # pylint: disable=W0212 + # self.classifier._check_proba() # pylint: disable=W0212 prob = self.classifier.decision_function(X) prob *= -1 -- cgit 1.2.3-korg